|
@@ -124,13 +124,19 @@ public class UserUtil {
|
|
|
if (count >= 100) {
|
|
|
throw new ServiceException("查询角色子级循环超过" + count + "次,可能成环,请检查或联系管理员!");
|
|
|
}
|
|
|
+
|
|
|
+ List<SysRole> temp = new ArrayList<>();
|
|
|
+
|
|
|
for (SysRole userRole : userRoles) {
|
|
|
List<SysRole> list = roleService.list(IWrapper.<SysRole>getWrapper().eq(SysRole::getParentId, userRole.getRoleId()));
|
|
|
if (ObjectUtil.isEmpty(list)) {
|
|
|
continue;
|
|
|
}
|
|
|
- userRoles.addAll(recursionRoles(list, count));
|
|
|
+
|
|
|
+ List<SysRole> roles = recursionRoles(list, count);
|
|
|
+ temp.addAll(roles);
|
|
|
}
|
|
|
+ userRoles.addAll(temp);
|
|
|
return userRoles;
|
|
|
}
|
|
|
|