From 065727651297d41edd99321596791d24f5a6032f Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Sat, 1 May 2021 14:28:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A5=E7=A7=8D=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/worktype/WorkTypeController.java | 15 +++++++-------- .../service/worktype/IWorkTypeService.java | 9 +++++++++ .../mybatis/mapper/worktype/work-type-mapper.xml | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/main/java/cn/com/tenlion/controller/api/worktype/WorkTypeController.java b/src/main/java/cn/com/tenlion/controller/api/worktype/WorkTypeController.java index 2d14282..fd90fe5 100644 --- a/src/main/java/cn/com/tenlion/controller/api/worktype/WorkTypeController.java +++ b/src/main/java/cn/com/tenlion/controller/api/worktype/WorkTypeController.java @@ -40,14 +40,13 @@ public class WorkTypeController extends DefaultBaseController { -// @ApiOperation(value = "工种类型树形列表", notes = "工种类型树形列表") -// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) -// @GetMapping("listztree") -// public List listZTree() { -// Map params = requestParams(); -// //return workTypeService.list(params); -// -// } + @ApiOperation(value = "工种类型树形列表", notes = "工种类型树形列表") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listztree") + public List listZTree() { + Map params = requestParams(); + return workTypeService.listZTree(params); + } diff --git a/src/main/java/cn/com/tenlion/service/worktype/IWorkTypeService.java b/src/main/java/cn/com/tenlion/service/worktype/IWorkTypeService.java index 0c7b34c..a34d2ba 100644 --- a/src/main/java/cn/com/tenlion/service/worktype/IWorkTypeService.java +++ b/src/main/java/cn/com/tenlion/service/worktype/IWorkTypeService.java @@ -1,5 +1,6 @@ package cn.com.tenlion.service.worktype; +import cn.com.tenlion.pojo.dtos.worktype.WorkTypeZTreeDTO; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultList; import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO; @@ -19,6 +20,14 @@ import java.util.Map; **/ public interface IWorkTypeService { + + /** + * 工种类型树形列表 + * @param params + * @return + */ + List listZTree(Map params); + /** * 新增工种类型 * diff --git a/src/main/resources/mybatis/mapper/worktype/work-type-mapper.xml b/src/main/resources/mybatis/mapper/worktype/work-type-mapper.xml index 1d58cfe..5fb1fff 100644 --- a/src/main/resources/mybatis/mapper/worktype/work-type-mapper.xml +++ b/src/main/resources/mybatis/mapper/worktype/work-type-mapper.xml @@ -40,7 +40,7 @@ - +