脱敏2
This commit is contained in:
@@ -45,6 +45,7 @@ public class ShopUser implements Serializable {
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@ColumnMask(Masks.CHINESE_NAME)
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.DesensitizedUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.account.dto.shopuser.*;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
@@ -92,6 +93,14 @@ public class AShopUserServiceImpl implements AShopUserService {
|
||||
Long mainIdByShopId = shopInfoService.getMainIdByShopId(StpKit.USER.getShopId());
|
||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||
PageInfo<ShopUserDTO> shopUsers = new PageInfo<>(shopUserMapper.selectPageByKeyAndIsVip(mainIdByShopId, isVip, key, amount));
|
||||
shopUsers.getList().forEach(shopUserDTO -> {
|
||||
if (StrUtil.isNotBlank(shopUserDTO.getPhone())) {
|
||||
shopUserDTO.setPhone(DesensitizedUtil.mobilePhone(shopUserDTO.getPhone()));
|
||||
}
|
||||
if (StrUtil.isNotBlank(shopUserDTO.getNickName())) {
|
||||
shopUserDTO.setNickName(DesensitizedUtil.chineseName(shopUserDTO.getNickName()));
|
||||
}
|
||||
});
|
||||
return PageUtil.convert(shopUsers);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user