From efafaeb3ba1b38273fdcd7009beaaa41afa5a0a0 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Fri, 24 Sep 2021 11:05:49 +0800
Subject: [PATCH] 1.单位
---
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
index c0dc0cb..e9e2fd8 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -122,7 +122,12 @@
</select>
<select id="selectUserPage" resultMap="userResultMap">
- select * from blade_user where is_deleted = 0
+ select bu.* from blade_user bu
+ left join
+ blade_dept bd
+ on
+ bd.id = bu.dept_id
+ where bu.is_deleted = 0
<if test="user.tenantId!=null and user.tenantId != ''">
and tenant_id = #{user.tenantId}
</if>
@@ -133,7 +138,7 @@
and real_name like concat(concat('%', #{user.realName}),'%')
</if>
<if test="user.deptId!=null and user.deptId != ''">
- and dept_id like concat(concat('%', #{user.deptId}),'%')
+ and (bd.id = #{user.deptId} or bd.parent_id = #{user.deptId})
</if>
<if test="user.userType!=null and user.userType != ''">
and user_type = #{user.userType}
@@ -149,7 +154,8 @@
</if>
<if test="user.hold!=null and user.hold != ''">
and hold = #{user.hold}
- </if> <if test="user.jurisdiction!=null and user.jurisdiction != ''">
+ </if>
+ <if test="user.jurisdiction!=null and user.jurisdiction != ''">
and jurisdiction = #{user.jurisdiction}
</if>
<if test="user.securitynumber!=null and user.securitynumber != ''">
@@ -158,7 +164,7 @@
<if test="user.examinationType!=null and user.examinationType != ''">
and examination_type = #{user.examinationType}
</if>
- ORDER BY id
+ ORDER BY bu.id
</select>
<select id="getUser" resultMap="userResultMap">
--
Gitblit v1.9.3