From d777c1924d404c87ba62b7cfbeda10b8751f9e7a Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Fri, 25 Jul 2025 14:39:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E6=B5=B7=E5=AE=A2=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/crm/service/CustomerService.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/crm/service/CustomerService.php b/app/crm/service/CustomerService.php index e781f68..4155de2 100644 --- a/app/crm/service/CustomerService.php +++ b/app/crm/service/CustomerService.php @@ -80,15 +80,18 @@ class CustomerService $query->whereIn('grade', $grade); } - if ($recycle == 'recycle' || $seas == 'seas') { + if ($recycle == 'recycle') { $query->onlyTrashed(); } + if ($seas == 'seas') { + $query->withTrashed()(); + } - $customer = Customer::where($where)->paginate($perPage, ['*'], 'page', $page); + $customer = $query->paginate($perPage, ['*'], 'page', $page); foreach ($customer as &$item) { $item = $this->getCustomer($item); if($seas == 'seas'){ - $item['seas_time'] = time()-(empty($item['deleted_at'])?0:strtotime($item['deleted_at'])); + $item['seas_time'] = time()-(empty($item['deleted_at'])?$item['updated_at']:strtotime($item['deleted_at'])); } } unset($item);