Commit 3b2477ef authored by xiaoguang.xu's avatar xiaoguang.xu

feat: 手机号最多掩码4位, 身份证最多掩码5位

parent 9bf53ffc
...@@ -638,10 +638,10 @@ public class InnerController implements IBaseController { ...@@ -638,10 +638,10 @@ public class InnerController implements IBaseController {
if (StringUtils.isBlank(phoneNo) || StringUtils.isBlank(idNo)) { if (StringUtils.isBlank(phoneNo) || StringUtils.isBlank(idNo)) {
return JsonResult.buildErrorStateResult("查询条件不能为空", null); return JsonResult.buildErrorStateResult("查询条件不能为空", null);
} }
//最多掩码 //最多掩码
int phoneNoMaskSize = 8; int phoneNoMaskSize = 7;
//最多掩码身份证后 //最多掩码身份证后
int idNoMaskSize = 14; int idNoMaskSize = 13;
int idNoFullSize = 18; int idNoFullSize = 18;
boolean phoneNoValid = phoneNo.length() >= phoneNoMaskSize || ValidationUtil.validatePhoneNo(phoneNo); boolean phoneNoValid = phoneNo.length() >= phoneNoMaskSize || ValidationUtil.validatePhoneNo(phoneNo);
boolean idNoValid = idNo.length() >= idNoMaskSize || Objects.equals(idNo.length(), idNoFullSize); boolean idNoValid = idNo.length() >= idNoMaskSize || Objects.equals(idNo.length(), idNoFullSize);
......
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