Browse Source

送达时间

master
Lemon 5 years ago
parent
commit
ccb07803a8
  1. 4
      app/Service/v3/Implementations/AppointmentTimeService.php

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

@ -37,6 +37,9 @@ class AppointmentTimeService implements AppointmentTimeServiceInterface
$shopcartIds = explode(',',$shopcartIds); $shopcartIds = explode(',',$shopcartIds);
$sotreIds = ShoppingCart::query()->whereIn('id',$shopcartIds)->pluck('store_id'); $sotreIds = ShoppingCart::query()->whereIn('id',$shopcartIds)->pluck('store_id');
$stores = Store::query()->whereIn('id',$sotreIds)->get()->toArray(); $stores = Store::query()->whereIn('id',$sotreIds)->get()->toArray();
if(empty($stores)){
throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE);
}
$time1Arr = []; $time1Arr = [];
$time2Arr = []; $time2Arr = [];
$time3Arr = []; $time3Arr = [];
@ -97,6 +100,7 @@ class AppointmentTimeService implements AppointmentTimeServiceInterface
if($nowTime > $startTime){ if($nowTime > $startTime){
$startTime = ceil($nowTime / (30*60)) * (30*60); $startTime = ceil($nowTime / (30*60)) * (30*60);
} }
//if(isset($closedTime) && )
//高峰段 区间 //高峰段 区间
$peakPeriod = strtotime('16:00'); $peakPeriod = strtotime('16:00');
$peakPeriodEnd = strtotime('18:00'); $peakPeriodEnd = strtotime('18:00');

Loading…
Cancel
Save