客户重复通知
This commit is contained in:
@@ -339,11 +339,11 @@ class CustomerController extends BaseController
|
||||
$distinct = [
|
||||
'email' => $email,
|
||||
'phone' => $phone,
|
||||
'whatsapp' => $whatsApp,
|
||||
'whatsApp' => $whatsApp,
|
||||
];
|
||||
$dis = (new CustomerService())->distinct($distinct,$corpId);
|
||||
if($dis){
|
||||
return $this->error('客户线索重复,已经有人在跟进');
|
||||
return $this->success($dis,'客户线索重复,已经业务跟进','distinct');
|
||||
}
|
||||
$res = Customer::create($data);
|
||||
} else {
|
||||
@@ -361,6 +361,25 @@ class CustomerController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重复通知
|
||||
* @param Request $request
|
||||
* @return \support\Response
|
||||
*/
|
||||
public function distinctNotice(Request $request){
|
||||
$customer_id = Util::getParam($request, 'customer_id');
|
||||
if (Util::isEmpty($customer_id)) {
|
||||
return $this->error('客户id不能为空');
|
||||
}
|
||||
$res = (new CustomerService())->distinctNotice($customer_id);
|
||||
|
||||
if ($res) {
|
||||
return $this->success($res, '成功');
|
||||
} else {
|
||||
return $this->error(trans('fail'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user