客户列表移除

This commit is contained in:
2025-08-19 16:36:36 +08:00
parent ee94799045
commit 220f1df6ca
@@ -147,15 +147,18 @@ class CustomerController extends BaseController
return $this->error('customer_id'.trans('not_null'));
}
$where = [
'id' => $param['customer_id'],
];
$customer = Customer::where($where)->withTrashed()->first();
$customer_id = explode(',', $param['customer_id']);
$customer = Customer::whereIn('id',$customer_id)->withTrashed()->first();
if(empty($customer)){
return $this->error( trans('fail'));
}
//软删除
$customer->status = 3;
if($param['scene'] == 'list'){ //管理端客户列表移除
$customer->status = 4;
}else{ //公海软删除
$customer->status = 3;
}
$res = $customer->save();
$customer->delete();