客户列表移除
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user