yxk-20260610-接口优化:获取某个用户的所有所在部门的id和部门名

增加d.del_flag = 0条件
This commit is contained in:
ye1023
2026-06-10 11:05:19 +08:00
parent e8cbda8f51
commit 551c3bc29b
@@ -79,6 +79,7 @@
INNER JOIN sys_user_depart ud ON d.id = ud.dep_id INNER JOIN sys_user_depart ud ON d.id = ud.dep_id
INNER JOIN sys_user u ON ud.user_id = u.id INNER JOIN sys_user u ON ud.user_id = u.id
<where> <where>
AND d.del_flag = 0
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
AND u.username = #{userName} AND u.username = #{userName}
</if> </if>
@@ -339,4 +340,4 @@
and tem.role_id = #{roleId} and tem.role_id = #{roleId}
GROUP BY u.username GROUP BY u.username
</select> </select>
</mapper> </mapper>