| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.UserDto; |
| | | import com.yuanchu.mom.dto.UserPageDto; |
| | |
| | | |
| | | DepartmentService departmentService; |
| | | @ValueClassify("人员明细") |
| | | @ApiOperation(value = "人员明细-添加部门") |
| | | @ApiOperation(value = "添加部门") |
| | | @PostMapping("/addDepartment") |
| | | public Result addDepartment(@RequestBody Department department) { |
| | | return Result.success(departmentService.addDepartment(department)); |
| | | } |
| | | @ValueClassify("人员明细") |
| | | @ApiOperation(value = "人员明细-获取部门树") |
| | | @ValueAuth |
| | | @ApiOperation(value = "获取部门树") |
| | | @GetMapping("/selectDepartment") |
| | | public Result selectDepartment() { |
| | | return Result.success(departmentService.selectDepartment()); |
| | | } |
| | | @ValueClassify("人员明细") |
| | | @ApiOperation(value = "人员明细-删除部门") |
| | | @ApiOperation(value = "删除部门") |
| | | @PostMapping("/delDepartment") |
| | | public Result delDepartment(Integer id) { |
| | | return Result.success(departmentService.delDepartment(id)); |
| | | } |
| | | @ValueClassify("人员明细") |
| | | @ApiOperation(value = "人员明细-根据选择的树展示相关的人员") |
| | | @ValueAuth |
| | | @ApiOperation(value = "根据选择的树展示相关的人员") |
| | | @PostMapping("/showUserById") |
| | | public Result showUserById(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |