diff --git a/app/crm/controller/CustomerController.php b/app/crm/controller/CustomerController.php index 1eb285e..dba4ae7 100644 --- a/app/crm/controller/CustomerController.php +++ b/app/crm/controller/CustomerController.php @@ -167,7 +167,7 @@ class CustomerController extends BaseController return $this->success($this->page($result)); } catch (\Throwable $e) { - return $this->error($e->getMessage().$e->getFile().$e->getLine()); + return $this->error($e->getMessage()); } } diff --git a/app/crm/service/CustomerService.php b/app/crm/service/CustomerService.php index a21eb3e..608ec04 100644 --- a/app/crm/service/CustomerService.php +++ b/app/crm/service/CustomerService.php @@ -132,6 +132,7 @@ class CustomerService 'user_id' => 0, ]); + $customer->user_id = 0; $customer->status = 2; $res = $customer->save(); diff --git a/app/crmAdmin/service/CustomerService.php b/app/crmAdmin/service/CustomerService.php index 07681cd..be9d819 100644 --- a/app/crmAdmin/service/CustomerService.php +++ b/app/crmAdmin/service/CustomerService.php @@ -110,7 +110,7 @@ class CustomerService $query->whereIn('grade', $grade); } - if ($recycle == 'recycle' || $scene == 'recycle' || $seas == 'seas' || $scene == 'seas') { + if ($recycle == 'recycle' || $scene == 'recycle' || $seas == 'seas' || $scene == 'seas' || $scene == 'audit') { $query->onlyTrashed(); } @@ -128,7 +128,7 @@ class CustomerService } if ($scene == 'audit') { //审核时查询举报人姓名 $customerHis = CustomerHis::where('customer_id', $item->id)->orderBy('id', 'desc')->first(['user_his']); - $customer['user_name'] = empty($customerHis['user_his']) ? '' : User::find($customer['user_his'])->value('name'); + $customer['user_name'] = empty($customerHis['user_his']) ? '' : User::where('id',$customer['user_his'])->value('name'); } } }