yuxc
2023-04-14 f2e6e77dc5a984e2fec4416717baa7c47118fcb1
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -137,10 +137,23 @@
                codeclassify0.parentCodeClassifyOid = #{oid}
            </if>
            <if test="oid = null or oid = ''">
                codeclassify0.parentCodeClassifyOid = is null
                codeclassify0.parentCodeClassifyOid is null
            </if>
        </where>
        CONNECT BY PRIOR codeclassify0.OID = codeclassify0.parentCodeClassifyOid
    </select>
    <select id="selectAllLevelParentByOid" resultType="java.util.HashMap">
        select oid,level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid
    </select>
    <select id="selectByFieldPath" resultType="java.util.HashMap">
        select *
        from (select oid, SYS_CONNECT_BY_PATH(id, '/') as paths
              from pl_code_classify
                       START WITH parentCodeClassifyOid is null
              CONNECT BY PRIOR OID = parentCodeClassifyOid) a
        where a.paths = #{fieldPath}
    </select>
</mapper>