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