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

interface

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