diff --git a/app/Service/Api/Driver/BaseDriverService.php b/app/Service/Api/Driver/BaseDriverService.php index 512c2c9..ac4da60 100644 --- a/app/Service/Api/Driver/BaseDriverService.php +++ b/app/Service/Api/Driver/BaseDriverService.php @@ -103,9 +103,10 @@ abstract class BaseDriverService extends BaseService ->where('delivered_id',$this->adminInfo->id) ->orderBy('sequence') ->get(); + if ($siteArr->isEmpty()) throw new ErrException('该司机并未绑定站点'); $this->siteArr = array_column($siteArr->toArray(),null,'id'); - $this->siteIds = array_keys($siteArr->toArray()); + $this->siteIds = array_keys($this->siteArr); } abstract public function handle();