代码优化
This commit is contained in:
		| @@ -63,12 +63,9 @@ public class SysDeptServiceImpl implements ISysDeptService | ||||
|         { | ||||
|             tempList.add(dept.getDeptId()); | ||||
|         } | ||||
|         for (Iterator<SysDept> iterator = depts.iterator(); iterator.hasNext();) | ||||
|         { | ||||
|             SysDept dept = (SysDept) iterator.next(); | ||||
|         for (SysDept dept : depts) { | ||||
|             // 如果是顶级节点, 遍历该父节点的所有子节点 | ||||
|             if (!tempList.contains(dept.getParentId())) | ||||
|             { | ||||
|             if (!tempList.contains(dept.getParentId())) { | ||||
|                 recursionFn(depts, dept); | ||||
|                 returnList.add(dept); | ||||
|             } | ||||
|   | ||||
| @@ -498,7 +498,7 @@ public class SysMenuServiceImpl implements ISysMenuService | ||||
|      */ | ||||
|     private boolean hasChild(List<SysMenu> list, SysMenu t) | ||||
|     { | ||||
|         return getChildList(list, t).size() > 0 ? true : false; | ||||
|         return getChildList(list, t).size() > 0; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user