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

interface

@@ -121,24 +121,18 @@ class OrderController extends HomeBaseController{ @@ -121,24 +121,18 @@ class OrderController extends HomeBaseController{
121 $price=1; 121 $price=1;
122 //判断是否跨天 122 //判断是否跨天
123 if ($endTime < $stateTime){ 123 if ($endTime < $stateTime){
124 - dump($hours_start_time);  
125 if ($hours_end_time > $hours_start_time){ 124 if ($hours_end_time > $hours_start_time){
126 - dump(date('Y-m-d H:i:s',$new_start_time));  
127 if ($new_start_time> strtotime('00:00:00') && $new_start_time < $endTime && $new_end_time > $endTime && $new_end_time < $stateTime){ 125 if ($new_start_time> strtotime('00:00:00') && $new_start_time < $endTime && $new_end_time > $endTime && $new_end_time < $stateTime){
128 - dump(date('Y-m-d H:i:s',$new_start_time));  
129 $price=ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$endTime)/3600) * $cost['cost']; 126 $price=ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$endTime)/3600) * $cost['cost'];
130 } 127 }
131 if ($new_start_time> strtotime('00:00:00') && $new_start_time < $endTime && $new_end_time > $stateTime){ 128 if ($new_start_time> strtotime('00:00:00') && $new_start_time < $endTime && $new_end_time > $stateTime){
132 - dump(date('Y-m-d H:i:s',$new_start_time));  
133 $price=ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$stateTime)/3600) * $interval['price'] + ceil(($stateTime-$endTime)/3600) * $cost['cost']; 129 $price=ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$stateTime)/3600) * $interval['price'] + ceil(($stateTime-$endTime)/3600) * $cost['cost'];
134 } 130 }
135 131
136 if ($new_start_time > $endTime && $new_end_time < $stateTime){ 132 if ($new_start_time > $endTime && $new_end_time < $stateTime){
137 - dump(date('Y-m-d H:i:s',$new_start_time));  
138 $price=ceil(($new_end_time-$new_start_time)/3600) * $cost['cost']; 133 $price=ceil(($new_end_time-$new_start_time)/3600) * $cost['cost'];
139 } 134 }
140 if ($new_start_time > $endTime && $new_end_time > $stateTime && $new_end_time < strtotime('24:00:00')){ 135 if ($new_start_time > $endTime && $new_end_time > $stateTime && $new_end_time < strtotime('24:00:00')){
141 - dump(date('Y-m-d H:i:s',$new_start_time));  
142 $price= ceil(($stateTime-$new_start_time)/3600) * $cost['cost'] + ceil(($new_end_time-$stateTime)/3600) * $interval['price']; 136 $price= ceil(($stateTime-$new_start_time)/3600) * $cost['cost'] + ceil(($new_end_time-$stateTime)/3600) * $interval['price'];
143 } 137 }
144 138