瀏覽代碼

ias 用户信息上传身份证号码校验

master
chenchaod 3 天之前
父節點
當前提交
1b5035339f

+ 3
- 2
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/order/UserUploadManager.java 查看文件



public static final String CUSTOMER_INFO = "customerInfo"; public static final String CUSTOMER_INFO = "customerInfo";
public static final String ACCOUNT = "account"; public static final String ACCOUNT = "account";
public static final Pattern userIdNum2 = Pattern.compile(RegexConstant.userIdNum2);// 身份证校验
@Autowired @Autowired
private RegisterNoCodeManager registerNoCodeManager; private RegisterNoCodeManager registerNoCodeManager;


} }
//身份证校验 //身份证校验
if (IdType.SFZ == idType) { if (IdType.SFZ == idType) {
throwBisExceptionOn(!MyPatterns.checkIdCode(idNum),"身份证证件号码不正确");
throwBisExceptionOn(!userIdNum2.matcher(idNum).matches(),"身份证证件号码不正确");
// throwBisExceptionOn(!MyPatterns.checkIdCode(idNum),"身份证证件号码不正确");
} }
AccountInfo accountInfo = accountInfoRepo.findByMobile(mobile); AccountInfo accountInfo = accountInfoRepo.findByMobile(mobile);
throwBisExceptionOn(accountInfo!=null && hasText(accountInfo.getIdNum())&&!idNum.equals(accountInfo.getIdNum()), "手机号已绑定其他证件号码"); throwBisExceptionOn(accountInfo!=null && hasText(accountInfo.getIdNum())&&!idNum.equals(accountInfo.getIdNum()), "手机号已绑定其他证件号码");

Loading…
取消
儲存