dev:人员列表手机号脱敏

main
SondonYong 2025-12-01 15:41:15 +08:00
parent a40da1d572
commit 5c14e5caa0
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package com.zcloud.basic.info.command.query;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.Response;
@ -53,6 +54,9 @@ public class UserQueryExe {
userE.dataProcessingRights(AuthContext.getTenantId(), params);
PageResponse<UserDO> pageResponse = userRepository.listPage(params);
List<UserCO> examCenterCOS = userCoConvertor.converDOsToCOs(pageResponse.getData());
if(CollUtil.isNotEmpty(examCenterCOS)){
examCenterCOS.forEach(this::desensitize);
}
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
}
@ -70,7 +74,9 @@ public class UserQueryExe {
List<UserCO> imgFilesCOList = userCoConvertor.converDOsToCOs(imgFilesDOList);
//手机号脱敏
//身份照脱敏
imgFilesCOList.forEach(this::desensitize);
if(CollUtil.isNotEmpty(imgFilesCOList)){
imgFilesCOList.forEach(this::desensitize);
}
return MultiResponse.of(imgFilesCOList);
}

View File

@ -24,8 +24,8 @@ public class UserCheckPassWordCmd extends Command {
@ApiModelProperty(value = "GBS用户id", name = "id", required = true)
@NotNull(message = "GBS用户id不能为空")
private Long id;
@ApiModelProperty(value = "密码", name = "password")
@NotEmpty(message = "密码不能为空")
@ApiModelProperty(value = "密码", name = "password")
@NotEmpty(message = "密码不能为空")
private String password;
}