| | |
| | | @AllArgsConstructor |
| | | @RequestMapping("/dept") |
| | | @Api(value = "部门", tags = "部门") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public class DeptController extends BladeController { |
| | | |
| | | private final IDeptService deptService; |
| | |
| | | @ApiOperation(value = "树形结构", notes = "树形结构") |
| | | public R<List<DeptVO>> tree(String tenantId, BladeUser bladeUser) { |
| | | List<DeptVO> tree = deptService.tree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId())); |
| | | return R.data(tree); |
| | | } |
| | | |
| | | @GetMapping("/treeByParentId") |
| | | @ApiOperationSupport(order = 10) |
| | | @ApiOperation(value = "树形结构", notes = "树形结构") |
| | | public R<List<DeptVO>> treeByParentId(String parentId) { |
| | | List<DeptVO> tree = deptService.treeByParentId(parentId); |
| | | return R.data(tree); |
| | | } |
| | | |
| | |
| | | return R.data(deptService.getDeptAndUserTree(treeNode)); |
| | | } |
| | | |
| | | @GetMapping("updateAllDept") |
| | | public R updateAllDept(){ |
| | | int number = deptService.updateAllDept(); |
| | | return R.data(number); |
| | | } |
| | | |
| | | |
| | | } |