diff --git a/app/crmAdmin/controller/CustomerController.php b/app/crmAdmin/controller/CustomerController.php index 2f3ba2e..900046d 100644 --- a/app/crmAdmin/controller/CustomerController.php +++ b/app/crmAdmin/controller/CustomerController.php @@ -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();