审核优化

This commit is contained in:
2025-08-06 15:56:57 +08:00
parent b5c73e524a
commit 601936a129
2 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -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;
+2 -5
View File
@@ -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']);