|
@@ -787,6 +787,24 @@ public class AuthProductServiceImpl implements AuthProductService {
|
|
listType = null == listType ? 1 : listType;
|
|
listType = null == listType ? 1 : listType;
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
List<ProductTypeListVo> productList = authProductMapper.getProductTypeList(listType, authUserId, name, status, auditStatus);
|
|
List<ProductTypeListVo> productList = authProductMapper.getProductTypeList(listType, authUserId, name, status, auditStatus);
|
|
|
|
+ //如果是手机号则进行脱敏处理
|
|
|
|
+ //手机号脱敏处理(脱敏规则: 保留前三后四, 比如15638296218置换为156****6218)
|
|
|
|
+ if(null!=productList&&productList.size()>0){
|
|
|
|
+ productList.forEach(authVo -> {
|
|
|
|
+ //判断是否是手机号
|
|
|
|
+ String phoneNumber=authVo.getCreateBy();
|
|
|
|
+ if(StringUtils.isNotEmpty(phoneNumber)){
|
|
|
|
+ boolean matches = phoneNumber.matches("^[1][3,4,5,7,8,9][0-9]{9}$");
|
|
|
|
+ if(matches){
|
|
|
|
+ //脱敏处理
|
|
|
|
+ if(StringUtils.isNotEmpty(phoneNumber)){
|
|
|
|
+ phoneNumber = phoneNumber.replaceAll("(\\w{3})\\w*(\\w{4})", "$1****$2");
|
|
|
|
+ authVo.setCreateBy(phoneNumber);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
PageInfo<ProductTypeListVo> pageData = new PageInfo<>(productList);
|
|
PageInfo<ProductTypeListVo> pageData = new PageInfo<>(productList);
|
|
return ResponseJson.success(pageData);
|
|
return ResponseJson.success(pageData);
|
|
}
|
|
}
|