From fb28685a5209be09c042f1a65650cb2fecefbc90 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 24 十一月 2022 15:53:29 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/UserMapper.xml |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml
index 27edca6..1b95192 100644
--- a/src/main/resources/mapper/UserMapper.xml
+++ b/src/main/resources/mapper/UserMapper.xml
@@ -51,4 +51,17 @@
         </if>
     </select>
 
+    <select id="getDeptManager" resultMap="BaseResultMap">
+        SELECT
+        su.*
+        FROM sys_user su
+        left join sys_role sr on su.role_id = sr.id
+        where 1=1
+        <if test="hostId != null and hostId != ''">
+            and su.host_id = #{hostId}
+        </if>
+        and su.dept_id = #{deptId}
+        and sr.code = 'manager'
+    </select>
+
 </mapper>

--
Gitblit v1.9.1