Commit 70f41f4d authored by xiaoguang.xu's avatar xiaoguang.xu

feat: 浅程科技, 支持身份证号码掩码后四位, 手机号掩码后三位

parent 61681f90
...@@ -637,11 +637,13 @@ public class InnerController implements IBaseController { ...@@ -637,11 +637,13 @@ 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 = 9; //最多掩码三位
int idNoMaskSize = 16; int phoneNoMaskSize = 8;
//最多掩码身份证后四位
int idNoMaskSize = 14;
int idNoFullSize = 18; int idNoFullSize = 18;
boolean phoneNoValid = Objects.equals(phoneNo.length(), phoneNoMaskSize) || ValidationUtil.validatePhoneNo(phoneNo); boolean phoneNoValid = phoneNo.length() >= phoneNoMaskSize || ValidationUtil.validatePhoneNo(phoneNo);
boolean idNoValid = Objects.equals(idNo.length(), idNoMaskSize) || Objects.equals(idNo.length(), idNoFullSize); boolean idNoValid = idNo.length() >= idNoMaskSize || Objects.equals(idNo.length(), idNoFullSize);
if (phoneNoValid && idNoValid) { if (phoneNoValid && idNoValid) {
List<UserDetail> userDetailList = userDetailService.fuzzyQueryByPhoneNoAndIdNo(phoneNo, idNo); List<UserDetail> userDetailList = userDetailService.fuzzyQueryByPhoneNoAndIdNo(phoneNo, idNo);
return JsonResult.buildSuccessResult("success", userDetailList); return JsonResult.buildSuccessResult("success", userDetailList);
......
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