From 601936a129c10cae72f8ab02e961a59bdb31cdac Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 6 Aug 2025 15:56:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/crmAdmin/logic/CustomerLogic.php | 2 +- app/crmAdmin/service/CustomerService.php | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/crmAdmin/logic/CustomerLogic.php b/app/crmAdmin/logic/CustomerLogic.php index 8f364e8..869982f 100644 --- a/app/crmAdmin/logic/CustomerLogic.php +++ b/app/crmAdmin/logic/CustomerLogic.php @@ -18,7 +18,7 @@ class CustomerLogic public function forceDelete(int $id) { - $customer = Customer::find($id); + $customer = Customer::withTrashed()->find($id); //强制删除 $res = $customer->forceDelete(); return $res; diff --git a/app/crmAdmin/service/CustomerService.php b/app/crmAdmin/service/CustomerService.php index 520d335..d003a0b 100644 --- a/app/crmAdmin/service/CustomerService.php +++ b/app/crmAdmin/service/CustomerService.php @@ -128,7 +128,8 @@ class CustomerService } if ($scene == 'audit') { //审核时查询举报人姓名 $customerHis = CustomerHis::where('customer_id', $item->id)->orderBy('id', 'desc')->first(['user_his']); - $item['user_name'] = empty($customerHis['user_his']) ? '' : User::where('id',$customer['user_his'])->value('name'); + var_dump($customerHis['user_his']); + $item['user_name'] = empty($customerHis['user_his']) ? '' : User::where('id',$customerHis['user_his'])->value('name'); } } } @@ -276,10 +277,6 @@ class CustomerService $id = $params['id']; - $where = [ - 'id' => $id, - ]; - $logic = new CustomerLogic(); if ($params['scene'] == 'delete') { return $logic->forceDelete($params['id']);