审核优化
This commit is contained in:
@@ -18,7 +18,7 @@ class CustomerLogic
|
|||||||
|
|
||||||
public function forceDelete(int $id)
|
public function forceDelete(int $id)
|
||||||
{
|
{
|
||||||
$customer = Customer::find($id);
|
$customer = Customer::withTrashed()->find($id);
|
||||||
//强制删除
|
//强制删除
|
||||||
$res = $customer->forceDelete();
|
$res = $customer->forceDelete();
|
||||||
return $res;
|
return $res;
|
||||||
|
|||||||
@@ -128,7 +128,8 @@ class CustomerService
|
|||||||
}
|
}
|
||||||
if ($scene == 'audit') { //审核时查询举报人姓名
|
if ($scene == 'audit') { //审核时查询举报人姓名
|
||||||
$customerHis = CustomerHis::where('customer_id', $item->id)->orderBy('id', 'desc')->first(['user_his']);
|
$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'];
|
$id = $params['id'];
|
||||||
|
|
||||||
$where = [
|
|
||||||
'id' => $id,
|
|
||||||
];
|
|
||||||
|
|
||||||
$logic = new CustomerLogic();
|
$logic = new CustomerLogic();
|
||||||
if ($params['scene'] == 'delete') {
|
if ($params['scene'] == 'delete') {
|
||||||
return $logic->forceDelete($params['id']);
|
return $logic->forceDelete($params['id']);
|
||||||
|
|||||||
Reference in New Issue
Block a user