Browse Source

Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix

master
weigang 6 years ago
parent
commit
6cc235c563
  1. 6
      app/Service/v3/Implementations/AppointmentTimeService.php

6
app/Service/v3/Implementations/AppointmentTimeService.php

@ -101,11 +101,7 @@ class AppointmentTimeService implements AppointmentTimeServiceInterface
$peakPeriod = strtotime('16:00');
$peakPeriodEnd = strtotime('18:00');
//取得订单下所有店铺时间段 交集 并计算时间段横跨单位区间长度
if($endTime == $startTime){
$length = 1;
}else{
$length = ceil(($endTime - $startTime) / (30*60));
}
$length = ceil(($endTime - $startTime) / (30*60)) + 1;
for ($i=1;$i<=$length;$i++){
$addTime = $startTime + (30*60*$i);
if($addTime >= $peakPeriod && $addTime < $peakPeriodEnd){

Loading…
Cancel
Save