Authored by qinchao

身份证号隐藏处理

... ... @@ -168,18 +168,18 @@ public class RealNameAuthorizeController {
throw new GatewayException(400, "uid不能为空!");
}
if ( StringUtils.isEmpty(reqVO.getCertNo())|| StringUtils.isEmpty(reqVO.getCertName())){
throw new GatewayException(400, "身份证号、姓名不能为空!");
}
//是否存在芝麻认证信息
ZhiMaCert zhiMaCert =realNameAuthorizeService.getValidZhiMaCert(reqVO.getUid());
if(zhiMaCert!=null){
if(zhiMaCert!=null&&(zhiMaCert.getCertName().contains("*")||zhiMaCert.getCertNo().contains("*"))){
//前端传过来的是mask的身份证号,用数据库的替换
reqVO.setCertName(zhiMaCert.getCertName());
reqVO.setCertNo(zhiMaCert.getCertNo());
logger.info("realNameAuthorize.zhiMaCertWithPhotoCheckInit reset mask ,zhiMaCert {} ,new reqVO is {}", zhiMaCert ,reqVO);
}else{
if ( StringUtils.isEmpty(reqVO.getCertNo())|| StringUtils.isEmpty(reqVO.getCertName())){
throw new GatewayException(400, "身份证号、姓名不能为空!");
}
//身份证格式校验IDCardUtils
if(!IDCardUtils.validate(reqVO.getCertNo())){
throw new GatewayException(400, "身份证号输入不正确!");
... ...