疯狂的狮子li
2021-12-24 5ca038d888922e93bf45c7bd37f3c6dce849dcff
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})