| | |
| | | // @PreAuthorize("hasAnyAuthority('system:dept:list')") |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "获取部门列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | public CommonResult list(SysDept dept) |
| | | { |
| | | List<DeptVo> depts = deptService.selectDeptList(dept); |
| | | return CommonResult.success(depts); |
| | | } |
| | | |
| | | @GetMapping("/pageList") |
| | | @ApiOperation(value = "获取部门列表分页") |
| | | public CommonResult pageList(SysDept dept) |
| | | { |
| | | |
| | | return CommonResult.success(deptService.selectDeptPageList(dept)); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/treeList") |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "Long", required = true, value = "公司id"), |
| | | }) |
| | | public CommonResult initFunctionalDistribution(@RequestParam Long companyId) { |
| | | public CommonResult initFunctionalDistribution(@RequestParam("companyId") Long companyId) { |
| | | return CommonResult.success(deptService.initFunctionalDistribution(companyId)); |
| | | } |
| | | |