Lius
2024-10-21 316ef1bf39d16a29c27fe26393e704c1d0b963f9
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml
@@ -23,14 +23,14 @@
    <!-- 根据部门Id查询,当前和下级所有部门IDS -->
    <select id="getSubDepIdsByDepId" resultType="java.lang.String">
      select id from sys_depart where del_flag = '0' and org_code like concat((select org_code from sys_depart where id=#{departId}),'%')
      select id from sys_depart where del_flag = '0' and org_code like (select org_code from sys_depart where id=#{departId}) +'%'
   </select>
    <!--根据部门编码获取我的部门下所有部门ids -->
    <select id="getSubDepIdsByOrgCodes" resultType="java.lang.String">
      select id from sys_depart where del_flag = '0' and
        <foreach collection="orgCodes" item="item" index="index"  open="(" separator="or" close=")">
            org_code LIKE CONCAT(#{item},'%')
            org_code LIKE #{item} + '%'
        </foreach>
   </select>
     <!--根据parent_id查询下级部门-->