| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("部门添加") |
| | | @Log(title = "【部门管理】添加", businessType = BusinessType.INSERT) |
| | | |
| | | public AjaxResult add(@Validated @RequestBody SysDept dto) |
| | | { |
| | | dto.setCreateTime(LocalDateTime.now()); |
| | |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation("部门修改") |
| | | @Log(title = "【部门管理】修改", businessType = BusinessType.UPDATE) |
| | | |
| | | public R edit(@Validated @RequestBody SysDept dept) |
| | | { |
| | | if (!deptService.checkDeptNameUnique1(dept)){ |
| | |
| | | private ISysUserService userService; |
| | | @ApiOperation(value = "禁用启用") |
| | | @PutMapping("/changeStatus") |
| | | @Log(title = "【部门管理】修改状态", businessType = BusinessType.UPDATE) |
| | | |
| | | public AjaxResult changeStatus(@RequestBody SysDeptUpdateStatusDTO dto) |
| | | { |
| | | SysDept user = new SysDept(); |
| | |
| | | */ |
| | | @DeleteMapping("/{deptId}") |
| | | @ApiOperation("删除部门") |
| | | @Log(title = "【部门管理】删除", businessType = BusinessType.DELETE) |
| | | |
| | | public AjaxResult remove(@PathVariable Long deptId) |
| | | { |
| | | return toAjax(deptService.deleteDeptById(deptId)); |