ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -52,7 +52,7 @@ <select id="selectDeptListByRoleId" resultType="Long"> select d.dept_id from sys_dept d left join sys_role_dept rd on d.dept_id = rd.dept_id left join sys_role_dept rd on d.dept_id = rd.dept_id where rd.role_id = #{roleId} <if test="deptCheckStrictly"> and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})