forked from github/dataease
Merge pull request #3749 from dataease/pr@dev@perf_user_grid
perf: 查询用户列表过滤废弃角色
This commit is contained in:
commit
f86d0c729c
@ -74,7 +74,7 @@ public class SysUserService {
|
||||
List<SysUserGridResponse> lists = extSysUserMapper.query(gridExample);
|
||||
lists.forEach(item -> {
|
||||
List<SysUserRole> roles = item.getRoles();
|
||||
List<Long> roleIds = roles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||
List<Long> roleIds = roles.stream().filter(ObjectUtils::isNotEmpty).map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||
item.setRoleIds(roleIds);
|
||||
});
|
||||
return lists;
|
||||
|
Loading…
Reference in New Issue
Block a user