cuijian
2023-08-19 bdd0875d4b13a3f1ef472f64d4b6a95e0ef64b22
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml
@@ -51,4 +51,35 @@
    <select id="queryCompByOrgCode" resultType="org.jeecg.modules.system.entity.SysDepart">
      select * from sys_depart where del_flag = '0' and org_category='1' and org_code= #{orgCode,jdbcType=VARCHAR}
   </select>
    <select id="getDepartTreeByParentId" parameterType="String" resultType="org.jeecg.common.system.vo.SelectTreeModel">
        select
            id as "key",
            depart_name as "title",
            parent_id as parentId
        from sys_depart
        where parent_id = #{parentId}
          and del_flag='0'
    </select>
    <select id="getDepartListByParentId"  resultType="org.jeecg.modules.system.entity.SysDepart">
        select
        id,
        org_code orgCode,
        depart_name departName
        from sys_depart
        where parent_id in
        <foreach collection="parentIds" open="(" separator="," close=")" item="parentId">
            #{parentId}
        </foreach>
        and del_flag='0'
    </select>
    <select id="getDepartTreeByParentId" parameterType="String" resultType="org.jeecg.common.system.vo.SelectTreeModel">
        select
            id as "key",
            depart_name as "title",
            parent_id as parentId
        from sys_depart
        where parent_id = #{parentId}
          and del_flag='0'
    </select>
</mapper>