| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.api.BasePageDTO; |
| | | import com.ycl.api.BasePageVO; |
| | | import com.ycl.api.CommonPage; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.dto.user.AdminDepartInfoDTO; |
| | | import com.ycl.entity.auth.Operator; |
| | | import com.ycl.entity.depart.SccgDepart; |
| | | import com.ycl.entity.user.UmsAdminDepart; |
| | | import com.ycl.entity.user.UmsMenu; |
| | | import com.ycl.service.depart.SccgDepartService; |
| | | import com.ycl.service.user.UmsAdminDepartService; |
| | | import com.ycl.service.user.UmsMenuService; |
| | | import com.ycl.entity.platform.depart.UmsDepart; |
| | | import com.ycl.service.platform.depart.UmsDepartService; |
| | | import com.ycl.service.platform.user.UmsDepartManageService; |
| | | import com.ycl.utils.auth.UserAuthUtil; |
| | | import com.ycl.vo.depart.DepartVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public class DepartController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SccgDepartService departService; |
| | | private UmsDepartService departService; |
| | | @Resource |
| | | private UmsAdminDepartService umsAdminDepartService; |
| | | private UmsDepartManageService umsAdminDepartService; |
| | | @Resource |
| | | private UserAuthUtil userAuthUtil; |
| | | |
| | | @ApiOperation("添加部门") |
| | | @PostMapping(value = "/create") |
| | |
| | | |
| | | @ApiOperation("详情") |
| | | @PostMapping(value = "/detail") |
| | | public CommonResult<SccgDepart> detail(@Validated @RequestBody DepartVO.IdDepartVO params) { |
| | | SccgDepart sccgDepart = departService.loadDepartById(params.getId()); |
| | | public CommonResult<UmsDepart> detail(@Validated @RequestBody DepartVO.IdDepartVO params) { |
| | | UmsDepart sccgDepart = departService.loadDepartById(params.getId()); |
| | | return CommonResult.success(sccgDepart); |
| | | } |
| | | |
| | | @ApiOperation("树结构") |
| | | @GetMapping(value = "/tree") |
| | | public CommonResult<List<SccgDepart>> tree() { |
| | | List<SccgDepart> tree = departService.tree(); |
| | | public CommonResult<List<UmsDepart>> tree() { |
| | | List<UmsDepart> tree = departService.tree(); |
| | | return CommonResult.success(tree); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation("查询全部部门") |
| | | @GetMapping(value = "/page") |
| | | public CommonResult<IPage<SccgDepart>> page(DepartVO.PageDepartVO params) { |
| | | IPage<SccgDepart> page = departService.pageDepart(params); |
| | | public CommonResult<IPage<UmsDepart>> page(DepartVO.PageDepartVO params) { |
| | | IPage<UmsDepart> page = departService.pageDepart(params); |
| | | return CommonResult.success(page); |
| | | } |
| | | |