From a47cdaef0fde50ce98ebd536cbc6696e724c1476 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 30 Jul 2025 15:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=8F=B8id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/crm/service/CustomerService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/crm/service/CustomerService.php b/app/crm/service/CustomerService.php index 3cffb7d..41bb8ad 100644 --- a/app/crm/service/CustomerService.php +++ b/app/crm/service/CustomerService.php @@ -84,7 +84,8 @@ class CustomerService $query->onlyTrashed(); } if ($seas == 'seas') { - $corpId = Corp::where('abbr', $params['corp_abbr'])->first()->value('id'); + $corp = Corp::where('abbr', $params['corp_abbr'])->first(); + $corpId = $corp?$corp->id:0; if($corpId == 1){ $query->whereIn('channel_id', [1,2,3,4,5,6,7,8]); } elseif($corpId == 3) {