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) {