| | |
| | | * @return 结果
|
| | | */
|
| | | @Override
|
| | | public String checkDeptNameUnique(SysDept dept)
|
| | | public boolean checkDeptNameUnique(SysDept dept)
|
| | | {
|
| | | Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId();
|
| | | SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId());
|
| | |
| | | @Override
|
| | | public void checkDeptDataScope(Long deptId)
|
| | | {
|
| | | if (!SysUser.isAdmin(SecurityUtils.getUserId()))
|
| | | if (!SysUser.isAdmin(SecurityUtils.getUserId()) && StringUtils.isNotNull(deptId))
|
| | | {
|
| | | SysDept dept = new SysDept();
|
| | | dept.setDeptId(deptId);
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 查询顶层部门id
|
| | | * @param deptId
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public Long maxLevelDeptId(Long deptId) {
|
| | | return deptMapper.maxLevelDeptId(deptId);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 递归列表
|
| | | */
|
| | | private void recursionFn(List<SysDept> list, SysDept t)
|