Merge pull request #6014 from linweijiang/pr-2

用户查询接口屏蔽密码信息返回
This commit is contained in:
taojinlong 2023-09-11 22:42:08 -05:00 committed by GitHub
commit cf00f46a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,7 @@ public class SysUserService {
gridExample.setExtendCondition(keyWord); gridExample.setExtendCondition(keyWord);
List<SysUserGridResponse> lists = extSysUserMapper.query(gridExample); List<SysUserGridResponse> lists = extSysUserMapper.query(gridExample);
lists.forEach(item -> { lists.forEach(item -> {
item.setPassword("");
List<SysUserRole> roles = item.getRoles(); List<SysUserRole> roles = item.getRoles();
List<Long> roleIds = roles.stream().filter(ObjectUtils::isNotEmpty).map(SysUserRole::getRoleId).collect(Collectors.toList()); List<Long> roleIds = roles.stream().filter(ObjectUtils::isNotEmpty).map(SysUserRole::getRoleId).collect(Collectors.toList());
item.setRoleIds(roleIds); item.setRoleIds(roleIds);