| | |
| | | */ |
| | | @Override |
| | | public List<Tree<Long>> selectDeptTreeList(SysDeptBo bo) { |
| | | // 只查询未禁用部门 |
| | | bo.setStatus(UserConstants.DEPT_NORMAL); |
| | | LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(bo); |
| | | List<SysDeptVo> depts = baseMapper.selectDeptList(lqw); |
| | | return buildDeptTreeSelect(depts); |
| | |
| | | lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysDept::getStatus, bo.getStatus()); |
| | | lqw.orderByAsc(SysDept::getParentId); |
| | | lqw.orderByAsc(SysDept::getOrderNum); |
| | | lqw.orderByAsc(SysDept::getDeptId); |
| | | return lqw; |
| | | } |
| | | |
| | |
| | | if (LoginHelper.isSuperAdmin()) { |
| | | return; |
| | | } |
| | | SysDeptVo dept = baseMapper.selectDeptById(deptId); |
| | | if (ObjectUtil.isNull(dept)) { |
| | | if (baseMapper.countDeptById(deptId) == 0) { |
| | | throw new ServiceException("没有权限访问部门数据!"); |
| | | } |
| | | } |