From 7ec36eee3bae7b9efa32dba01776f5760d91b81a Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期五, 28 十月 2022 11:25:14 +0800 Subject: [PATCH] 查询部门id --- ycl-common/src/main/resources/mapper/user/UmsAdminMapper.xml | 4 +++- ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java | 4 ++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java b/ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java index 0779678..efdacf7 100644 --- a/ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java +++ b/ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java @@ -80,6 +80,10 @@ @TableField(exist = false) private String departName; + @ApiModelProperty(value = "閮ㄩ棬id") + @TableField(exist = false) + private String departmentId; + @ApiModelProperty(value = "鐢ㄦ埛绫诲瀷") private Integer userType; diff --git a/ycl-common/src/main/resources/mapper/user/UmsAdminMapper.xml b/ycl-common/src/main/resources/mapper/user/UmsAdminMapper.xml index 82b8e5b..e6e2e2c 100644 --- a/ycl-common/src/main/resources/mapper/user/UmsAdminMapper.xml +++ b/ycl-common/src/main/resources/mapper/user/UmsAdminMapper.xml @@ -61,6 +61,7 @@ <result column="is_dy" property="isDy"/> <result column="job_title" property="jobTitle"/> <result column="depart_name" property="departName"/> + <result column="departmentId" property="departmentId"/> <result column="user_type" property="userType"/> <result column="zj" property="zj"/> <result column="mobile" property="mobile"/> @@ -85,7 +86,8 @@ </select> <select id="selectPageByWordKey" resultMap="adminMap"> SELECT t1.*, - t3.depart_name + t3.depart_name, + t3.id as departmentId FROM `ums_admin` t1 LEFT JOIN ums_depart_manager t2 ON t1.id = t2.user_id LEFT JOIN ums_depart t3 ON t2.depart_id = t3.id -- Gitblit v1.8.0