Commit 30e9d3f7 authored by 技术部-任文超's avatar 技术部-任文超

Fix bug:实名信息校验不严格;用户创建时间不应被修改

parent 6bea94c0
......@@ -210,6 +210,7 @@ public class InnerController implements IBaseController {
User user = userService.findByPhoneWithCache(phoneNo);
if (user == null) {
user = new User();
user.setCreatedAt(new Timestamp(createdAt));
} else if (!user.getEnable()) {
log.info("用户已经注销,phoneNo:{}", phoneNo);
return JsonResult.buildErrorStateResult("用户已经注销", null);
......@@ -218,7 +219,6 @@ public class InnerController implements IBaseController {
user.setUuid(uuid);
}
user.setPhoneNo(phoneNo);
user.setCreatedAt(new Timestamp(createdAt));
user.setUpdatedAt(new Timestamp(updatedAt));
user.setEnable(true);
user.setRegisteredFrom(registeredFrom);
......@@ -253,6 +253,12 @@ public class InnerController implements IBaseController {
if (StringUtils.isBlank(idNo)) {
return JsonResult.buildErrorStateResult("用户身份证为空.", null);
}
if (!ValidationUtil.validatePhoneNo(phoneNo)) {
return JsonResult.buildErrorStateResult("用户手机号错误.", null);
}
if (!ValidationUtil.validateChinese(name)) {
return JsonResult.buildErrorStateResult("用户姓名错误.", null);
}
IdCardInfo info = idCardService.getIdCardInfo(idNo);
if (Objects.isNull(info) || !info.isValid()) {
log.error("用户身份证号错误,userId:{},idNo: {}", userId, idNo);
......
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