From 2ef9eed4d7f7c61c390e3aca9dcc42d3267de611 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Wed, 9 Apr 2025 17:08:13 +0800 Subject: [PATCH] feat : rank --- app/Service/Api/Driver/BaseDriverService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();