作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

interface

@@ -110,7 +110,7 @@ class OrderController extends HomeBaseController{ @@ -110,7 +110,7 @@ class OrderController extends HomeBaseController{
110 $date=floor(($end_time-$start_time)/86400); 110 $date=floor(($end_time-$start_time)/86400);
111 //去余数 111 //去余数
112 $yu=($end_time-$start_time)%86400; 112 $yu=($end_time-$start_time)%86400;
113 - 113 + dump($yu);
114 $new_start_time=$end_time-$yu;//时间戳 114 $new_start_time=$end_time-$yu;//时间戳
115 $new_end_time= $end_time;//时间戳 115 $new_end_time= $end_time;//时间戳
116 116
@@ -123,7 +123,6 @@ class OrderController extends HomeBaseController{ @@ -123,7 +123,6 @@ class OrderController extends HomeBaseController{
123 //判断是否跨天 123 //判断是否跨天
124 if ($endTime < $stateTime){ 124 if ($endTime < $stateTime){
125 if ($hours_end_time > $hours_start_time){ 125 if ($hours_end_time > $hours_start_time){
126 -  
127 if ($new_start_time> strtotime('00:00:00') && $new_start_time < $endTime && $new_end_time > $endTime && $new_end_time < $stateTime){ 126 if ($new_start_time> strtotime('00:00:00') && $new_start_time < $endTime && $new_end_time > $endTime && $new_end_time < $stateTime){
128 $price=ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$endTime)/3600) * $cost['cost']; 127 $price=ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$endTime)/3600) * $cost['cost'];
129 } 128 }