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

interface

@@ -139,23 +139,23 @@ class OrderController extends HomeBaseController{ @@ -139,23 +139,23 @@ class OrderController extends HomeBaseController{
139 if ($hours_end_time > $hours_start_time){ 139 if ($hours_end_time > $hours_start_time){
140 //在预设时间段左边并不与之重合 140 //在预设时间段左边并不与之重合
141 if (($new_start_time > strtotime('00:00:00') && $new_start_time < $endTime) && ($new_end_time > $new_start_time && $new_end_time < $endTime)){ 141 if (($new_start_time > strtotime('00:00:00') && $new_start_time < $endTime) && ($new_end_time > $new_start_time && $new_end_time < $endTime)){
142 - echo 1; 142 + dump('1');
143 $price +=(ceil(($new_end_time-$new_start_time)/3600) * $interval['price']); 143 $price +=(ceil(($new_end_time-$new_start_time)/3600) * $interval['price']);
144 } 144 }
145 //与预设时间段的尾部重合 145 //与预设时间段的尾部重合
146 if (($new_start_time > strtotime('00:00:00') && $new_start_time < $endTime) && ($new_end_time > $endTime && $new_end_time < $stateTime)){ 146 if (($new_start_time > strtotime('00:00:00') && $new_start_time < $endTime) && ($new_end_time > $endTime && $new_end_time < $stateTime)){
147 - echo 2; 147 + dump('2');
148 $price +=(ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$endTime)/3600) * $cost['cost']); 148 $price +=(ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$endTime)/3600) * $cost['cost']);
149 } 149 }
150 //与预设时间段的头尾都重合 150 //与预设时间段的头尾都重合
151 if (($new_start_time > strtotime('00:00:00') && $new_start_time < $endTime) && $new_end_time > $stateTime){ 151 if (($new_start_time > strtotime('00:00:00') && $new_start_time < $endTime) && $new_end_time > $stateTime){
152 - echo 3; 152 + dump('3');
153 $price +=(ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$stateTime)/3600) * $interval['price'] + ceil(($stateTime-$endTime)/3600) * $cost['cost']); 153 $price +=(ceil(($endTime-$new_start_time)/3600) * $interval['price'] + ceil(($new_end_time-$stateTime)/3600) * $interval['price'] + ceil(($stateTime-$endTime)/3600) * $cost['cost']);
154 } 154 }
155 //不与预设时间段重合 155 //不与预设时间段重合
156 if (($new_start_time > $endTime && $new_start_time < $stateTime) && ($new_end_time < $new_start_time && $new_end_time < $stateTime)){ 156 if (($new_start_time > $endTime && $new_start_time < $stateTime) && ($new_end_time < $new_start_time && $new_end_time < $stateTime)){
157 //存在首小时免费 157 //存在首小时免费
158 - echo 4; 158 + dump('4');
159 echo $new_end_time; 159 echo $new_end_time;
160 echo $new_start_time; 160 echo $new_start_time;
161 $price +=(ceil(($new_end_time-$new_start_time)/3600) * $cost['cost']); 161 $price +=(ceil(($new_end_time-$new_start_time)/3600) * $cost['cost']);
@@ -167,7 +167,7 @@ class OrderController extends HomeBaseController{ @@ -167,7 +167,7 @@ class OrderController extends HomeBaseController{
167 //与预设时间段的头部重合 167 //与预设时间段的头部重合
168 if (($new_start_time > $endTime && $new_start_time < $stateTime) && ($new_end_time > $stateTime && $new_end_time < strtotime('24:00:00'))){ 168 if (($new_start_time > $endTime && $new_start_time < $stateTime) && ($new_end_time > $stateTime && $new_end_time < strtotime('24:00:00'))){
169 //存在首小时免费 169 //存在首小时免费
170 - echo 5; 170 + dump('5');
171 $price += (ceil(($stateTime-$new_start_time)/3600) * $cost['cost'] + ceil(($new_end_time-$stateTime)/3600) * $interval['price']); 171 $price += (ceil(($stateTime-$new_start_time)/3600) * $cost['cost'] + ceil(($new_end_time-$stateTime)/3600) * $interval['price']);
172 if ($free==1 && $is_free==0){ 172 if ($free==1 && $is_free==0){
173 $price-=$cost['cost']; 173 $price-=$cost['cost'];
@@ -176,7 +176,7 @@ class OrderController extends HomeBaseController{ @@ -176,7 +176,7 @@ class OrderController extends HomeBaseController{
176 } 176 }
177 //在预设时间段右边并不与之重合 177 //在预设时间段右边并不与之重合
178 if (($new_start_time > $stateTime && $new_start_time < strtotime('24:00:00')) && ($new_end_time > $new_start_time && $new_end_time < strtotime('24:00:00'))){ 178 if (($new_start_time > $stateTime && $new_start_time < strtotime('24:00:00')) && ($new_end_time > $new_start_time && $new_end_time < strtotime('24:00:00'))){
179 - echo 6; 179 + dump('6');
180 $price +=(ceil(($new_end_time-$new_start_time)/3600) * $interval['price']); 180 $price +=(ceil(($new_end_time-$new_start_time)/3600) * $interval['price']);
181 } 181 }
182 182