|
|
@@ -334,6 +334,10 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
return res;
|
|
|
}
|
|
|
//判断电话号码
|
|
|
+ if (customerService.checkContactMobile(in.getContactMobile())>1){
|
|
|
+ res.getError().add(buildError("电话已经在系统填入多次"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
if (!RegexUtils.isMobile(in.getContactMobile())) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "联系人电话格式错误", "联系人电话"));
|
|
|
return res;
|
|
|
@@ -372,6 +376,10 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("手机号码格式错误"));
|
|
|
return res;
|
|
|
}
|
|
|
+ if (customerService.checkContactMobile(in.getContactMobile())>1){
|
|
|
+ res.getError().add(buildError("电话已经在系统填入多次"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
in.setType(1);
|
|
|
//新增为私有客户
|
|
|
in.setShareType(0);
|
|
|
@@ -1135,6 +1143,14 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("联系人号码和联系人姓名不能为空"));
|
|
|
return res;
|
|
|
}
|
|
|
+ if (!RegexUtils.isMobile(ocb.getMobile())) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "联系人电话格式错误", "联系人电话"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ if (customerService.checkContactMobile(ocb.getMobile())>1){
|
|
|
+ res.getError().add(buildError("电话已经在系统填入多次"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
customerService.addOneContact(ocb);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -1705,6 +1721,10 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("","手机号码格式错误"));
|
|
|
return res;
|
|
|
}
|
|
|
+ if (customerService.checkContactMobile(in.getContactMobile())>1){
|
|
|
+ res.getError().add(buildError("电话已经在系统填入多次"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
}
|
|
|
Result result = receiveCustomer(in.getId(), null);
|
|
|
res.getError().addAll(result.getError());
|