| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Api(tags = "部门管理") |
| | | @RestController |
| | | @RequestMapping("/t-project-dept") |
| | | @RequestMapping("/t-dept") |
| | | public class TDeptController { |
| | | @Resource |
| | | private TDeptService deptService; |
| | |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<DeptListVO>> pageList(@RequestBody DeptListQuery query) { |
| | | return R.ok(deptService.pageList(query)); |
| | | } |
| | | @ApiOperation(value = "部门不分页列表") |
| | | @PostMapping(value = "/listAll") |
| | | public R<List<TDept>> listAll() { |
| | | List<TDept> depts = deptService.list(); |
| | | return R.ok(depts); |
| | | } |
| | | @Log(title = "新增部门", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增部门") |
| | |
| | | } |
| | | @Log(title = "启用/禁用部门", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "启用/禁用部门") |
| | | @DeleteMapping(value = "/editStatus") |
| | | @GetMapping(value = "/editStatus") |
| | | public R<Boolean> editStatus(@RequestParam String id) { |
| | | TDept byId = deptService.getById(id); |
| | | if (byId.getStatus()==1){ |