| | |
| | | {
|
| | | tempList.add(dept.getDeptId());
|
| | | }
|
| | | for (Iterator<SysDept> iterator = depts.iterator(); iterator.hasNext();)
|
| | | for (SysDept dept : depts)
|
| | | {
|
| | | SysDept dept = (SysDept) iterator.next();
|
| | | // 如果是顶级节点, 遍历该父节点的所有子节点
|
| | | if (!tempList.contains(dept.getParentId()))
|
| | | {
|
| | |
| | | * @return 选中部门列表
|
| | | */
|
| | | @Override
|
| | | public List<Integer> selectDeptListByRoleId(Long roleId)
|
| | | public List<Long> selectDeptListByRoleId(Long roleId)
|
| | | {
|
| | | SysRole role = roleMapper.selectRoleById(roleId);
|
| | | return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
|
| | |
| | | public boolean hasChildByDeptId(Long deptId)
|
| | | {
|
| | | int result = deptMapper.hasChildByDeptId(deptId);
|
| | | return result > 0 ? true : false;
|
| | | return result > 0;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | public boolean checkDeptExistUser(Long deptId)
|
| | | {
|
| | | int result = deptMapper.checkDeptExistUser(deptId);
|
| | | return result > 0 ? true : false;
|
| | | return result > 0;
|
| | | }
|
| | |
|
| | | /**
|