| | |
| | | } |
| | | |
| | | /** |
| | | * 获取部门树形结构 |
| | | */ |
| | | @GetMapping("/treeByDept") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "树形结构", notes = "树形结构") |
| | | public R<List<DeptVO>> treeByDept(@RequestParam(value = "deptId", required = true) Long deptId) { |
| | | List<DeptVO> tree = deptService.tree(deptId); |
| | | return R.data(tree); |
| | | } |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构 |
| | | */ |
| | | @GetMapping("/lazy-tree") |
| | |
| | | List<DeptVO> tree(String tenantId); |
| | | |
| | | /** |
| | | * 机构id |
| | | * @param deptId |
| | | * @return |
| | | */ |
| | | List<DeptVO> tree(Long deptId); |
| | | |
| | | /** |
| | | * 懒加载树形结构 |
| | | * |
| | | * @param tenantId |
| | |
| | | return ForestNodeMerger.merge(tree); |
| | | } |
| | | |
| | | /** |
| | | * 机构id |
| | | * @param deptId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DeptVO> tree(Long deptId) { |
| | | List<DeptVO> tree = baseMapper.tree("000000", deptId); |
| | | return ForestNodeMerger.merge(tree); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeptVO> lazyTree(String tenantId, Long parentId) { |
| | | if (AuthUtil.isAdministrator()) { |