From f0ba8d48c93e830a29df4530bc2b0815c4d0723a Mon Sep 17 00:00:00 2001 From: horizon <1490493387@qq.com> Date: Mon, 5 Sep 2022 07:41:04 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=83=A8=E9=97=A8=E5=A2=9E?= =?UTF-8?q?=E5=88=A0=E6=94=B9=E6=9F=A5=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/SysDeptController.java | 45 ++++-- .../youlai/admin/converter/DeptConverter.java | 21 +++ .../com/youlai/admin/pojo/form/DeptForm.java | 27 ++++ .../admin/pojo/vo/dept/DeptDetailVO.java | 27 ++++ .../youlai/admin/service/SysDeptService.java | 31 +++- .../service/impl/SysDeptServiceImpl.java | 143 +++++++++++------- 6 files changed, 219 insertions(+), 75 deletions(-) create mode 100644 youlai-admin/admin-boot/src/main/java/com/youlai/admin/converter/DeptConverter.java create mode 100644 youlai-admin/admin-boot/src/main/java/com/youlai/admin/pojo/form/DeptForm.java create mode 100644 youlai-admin/admin-boot/src/main/java/com/youlai/admin/pojo/vo/dept/DeptDetailVO.java diff --git a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/SysDeptController.java b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/SysDeptController.java index 21bb0076d..9da30f9fc 100644 --- a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/SysDeptController.java +++ b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/SysDeptController.java @@ -1,15 +1,19 @@ package com.youlai.admin.controller; -import com.youlai.admin.pojo.entity.SysDept; +import com.youlai.admin.pojo.form.DeptForm; import com.youlai.admin.pojo.query.DeptQuery; +import com.youlai.admin.pojo.vo.dept.DeptDetailVO; import com.youlai.admin.pojo.vo.dept.DeptVO; import com.youlai.admin.service.SysDeptService; import com.youlai.common.result.Result; import com.youlai.common.web.domain.Option; -import io.swagger.annotations.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; +import javax.validation.Valid; import java.util.List; /** @@ -26,44 +30,53 @@ public class SysDeptController { private final SysDeptService deptService; - @ApiOperation(value = "部门列表") + @ApiOperation(value = "获取部门列表") @GetMapping public Result> listDepts(DeptQuery queryParams) { List list = deptService.listDepts(queryParams); return Result.success(list); } - @ApiOperation(value = "部门下拉列表") - @GetMapping("/select_list") - public Result lisetDeptOptions() { + @ApiOperation(value = "获取部门下拉选项") + @GetMapping("/options") + public Result> lisetDeptOptions() { List