This commit is contained in:
2026-03-24 09:36:41 +08:00
parent 6fb9b55e71
commit 061e003ca7
2 changed files with 10 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ public class ShopUser implements Serializable {
/**
* 用户昵称
*/
@ColumnMask(Masks.CHINESE_NAME)
private String nickName;
/**

View File

@@ -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);
}