ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
@@ -63,9 +63,11 @@ { tempList.add(dept.getDeptId()); } for (SysDept dept : depts) { for (SysDept dept : depts) { // 如果是顶级节点, 遍历该父节点的所有子节点 if (!tempList.contains(dept.getParentId())) { if (!tempList.contains(dept.getParentId())) { recursionFn(depts, dept); returnList.add(dept); }