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>