diff --git a/backend/src/main/java/io/dataease/service/sys/SysUserService.java b/backend/src/main/java/io/dataease/service/sys/SysUserService.java index 466153a885..a29e38c3cd 100644 --- a/backend/src/main/java/io/dataease/service/sys/SysUserService.java +++ b/backend/src/main/java/io/dataease/service/sys/SysUserService.java @@ -74,7 +74,7 @@ public class SysUserService { List lists = extSysUserMapper.query(gridExample); lists.forEach(item -> { List roles = item.getRoles(); - List roleIds = roles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList()); + List roleIds = roles.stream().filter(ObjectUtils::isNotEmpty).map(SysUserRole::getRoleId).collect(Collectors.toList()); item.setRoleIds(roleIds); }); return lists;