|
|
@@ -333,6 +333,11 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("","创建客户参数不全"));
|
|
|
return res;
|
|
|
}
|
|
|
+ //判断电话号码
|
|
|
+ if (!RegexUtils.isMobile(in.getContactMobile())) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "联系人电话格式错误", "联系人电话"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
if (!customerService.checkAid(TokenManager.getAdminId(),Integer.valueOf(AFTConstants.CUSTOMER_SERVICE_SALESMAN))){
|
|
|
if (customerService.checkMax(null,TokenManager.getAdminId())) {
|
|
|
res.getError().add(buildError("","私有客户已达最大限制"));
|
|
|
@@ -362,6 +367,11 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
res.getError().add(buildError("客户名称已存在"));
|
|
|
return res;
|
|
|
}
|
|
|
+ //添加电话正则
|
|
|
+ if (!RegexUtils.isMobile(in.getContactMobile())){
|
|
|
+ res.getError().add(buildError("手机号码格式错误"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
in.setType(1);
|
|
|
//新增为私有客户
|
|
|
in.setShareType(0);
|
|
|
@@ -1689,6 +1699,13 @@ public class AdminCustomerApiController extends BaseApiController{
|
|
|
return res;
|
|
|
}
|
|
|
}
|
|
|
+ //手机号码判断
|
|
|
+ if (in.getContactMobile()!=null){
|
|
|
+ if (!RegexUtils.isMobile(in.getContactMobile())){
|
|
|
+ res.getError().add(buildError("","手机号码格式错误"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ }
|
|
|
Result result = receiveCustomer(in.getId(), null);
|
|
|
res.getError().addAll(result.getError());
|
|
|
if (!res.getError().isEmpty()){
|