Commit d9456d04 by guojuxing

导购批量导入,区号默认+

parent b0ac9738
......@@ -66,9 +66,16 @@ public class ClerkApiServiceImpl implements ClerkApiService {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "导购关联主键重复");
}
if (StringUtils.isNotBlank(clerkDTO.getPhoneNumber())) {
if (StringUtils.isBlank(clerkDTO.getNationcode())) {
clerkDTO.setNationcode(Constants.NATION_CODE);
String nationcode = clerkDTO.getNationcode();
if (StringUtils.isBlank(nationcode)) {
nationcode = Constants.NATION_CODE;
}
//默认加上+
if (!nationcode.contains("+")) {
nationcode = "+" + nationcode;
}
clerkDTO.setNationcode(nationcode);
if (clerkService.isRepeatByPhoneNumber(clerkDTO.getStoreInfoId(), clerkDTO.getPhoneNumber(),
clerkDTO.getClerkId(), clerkDTO.getNationcode())) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "手机号重复");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment