客户重复通知

This commit is contained in:
2025-08-26 09:29:46 +08:00
parent 958f4448d6
commit e031c6dbd5
4 changed files with 52 additions and 15 deletions
+21 -2
View File
@@ -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'));
}
}
/**