ludc
2023-09-13 4a2835ddadb796c69f180097b95f971dbab4687d
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -45,7 +45,10 @@
    </sql>
    <select id="selectPlCodeClassifyPage" resultMap="plCodeClassifyResultMap">
        select * from PL_CODE_CLASSIFY where is_deleted = 0
        select * from PL_CODE_CLASSIFY where
        <if test="tenantId != null and tenantId != ''">
            tenant_id = #{tenantId}
        </if>
    </select>
    <select id="selectAllLevelChildOid" resultType="java.util.HashMap">
@@ -238,7 +241,6 @@
                        SYS_CONNECT_BY_PATH(id, '#')   as paths
                    </otherwise>
                </choose>
        from pl_code_classify  plcodeclassify
                  START WITH parentCodeClassifyOid is null
              CONNECT BY PRIOR OID = parentCodeClassifyOid) codeclassify0
@@ -360,9 +362,8 @@
        <if test="parentOid == null or parentOid == ''">
            and codeclassify0.parentcodeclassifyoid is null
        </if>
        <if test="tenantId != null and tenantId != ''">
            codeclassify0.tenant_id = #{tenantId}
            and codeclassify0.tenant_id = #{tenantId}
        </if>
        order by id asc
    </select>
@@ -407,7 +408,7 @@
            </foreach>
        </if>
        <if test="tenantId != null and tenantId != ''">
            codeclassify0.tenant_id = #{tenantId}
            and codeclassify0.tenant_id = #{tenantId}
        </if>
        order by id asc
    </select>
@@ -447,7 +448,6 @@
        <if test="desc != null">
            and  codeclassify0.DESCRIPTION = #{desc}
        </if>
        <if test="tenantId != null and tenantId != ''">
          and  codeclassify0.tenant_id = #{tenantId}
        </if>
@@ -510,4 +510,11 @@
        </foreach>
        ;END;
    </update>
    <select id="selectAllParents" resultMap="plCodeClassifyResultMap">
        select * from PL_CODE_CLASSIFY p
            start with p.OID =#{oid}
        connect by p.oid = prior p.PARENTCODECLASSIFYOID
    </select>
</mapper>