| | |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.node.TreeNodes; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.vo.DeptVO; |
| | | import org.springblade.modules.system.wrapper.DeptWrapper; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构(包含用户数据),只查下一级的数据 |
| | | * @return |
| | | */ |
| | | @GetMapping("/lazy-tree-users") |
| | | public R<List<TreeNodes>> lazyTreeUsers(Integer type, Long deptId) { |
| | | List<TreeNodes> tree = deptService.lazyTreeUsers(type,deptId); |
| | | return R.data(tree); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | */ |
| | | @GetMapping("/security_lazy-tree") |
| | | @ApiOperation(value = "懒加载树形结构", notes = "树形结构") |
| | | public R<List<DeptVO>> securityLazyTree(String tenantId, Long parentId, BladeUser bladeUser) { |
| | | List<DeptVO> tree = deptService.securityLazyTree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()), parentId); |
| | | public R<List<DeptVO>> securityLazyTree(String jurisdiction, Long parentId,Long deptId) { |
| | | List<DeptVO> tree = deptService.securityLazyTree(jurisdiction,parentId,deptId); |
| | | return R.data(tree); |
| | | } |
| | | } |