| | |
| | | codekeyattrrepeatoid.name as codeKeyAttrRepeatOidName, |
| | | coderesembleruleoid.name as codeResembleRuleOidName, |
| | | level as datalevel, |
| | | SYS_CONNECT_BY_PATH(codeclassify0.id, '#') as path |
| | | <choose> |
| | | <when test='fieldInPath=="name"'> |
| | | SYS_CONNECT_BY_PATH(codeclassify0.name, '#') as path |
| | | </when> |
| | | <when test='fieldInPath=="oid"'> |
| | | SYS_CONNECT_BY_PATH(codeclassify0.oid, '#') as path |
| | | </when> |
| | | <otherwise> |
| | | SYS_CONNECT_BY_PATH(codeclassify0.id, '#') as path |
| | | </otherwise> |
| | | </choose> |
| | | from pl_code_classify codeclassify0 |
| | | left join pl_code_rule coderuleoid |
| | | on codeclassify0.codeRuleOid = coderuleoid.oid |
| | |
| | | codeclassify0.parentCodeClassifyOid is null |
| | | </if> |
| | | CONNECT BY PRIOR codeclassify0.OID = codeclassify0.parentCodeClassifyOid |
| | | </select> |
| | | |
| | | <select id="selectByIdRel" resultMap="plCodeClassifyResultMap"> |
| | | select pc.*, |
| | | pk.name codeKeyAttrRepeatOidName, |
| | | pr.name codeResembleRuleOidName, |
| | | pu.name coderuleoidName |
| | | from pl_code_classify pc |
| | | left join pl_code_keyattrrepeat pk |
| | | on pc.codekeyattrrepeatoid = pk.oid |
| | | left join pl_code_resemblerule pr |
| | | on pc.coderesembleruleoid = pr.oid |
| | | left join pl_code_rule pu |
| | | on pc.coderuleoid = pu.oid |
| | | where pc.oid = #{oid} |
| | | </select> |
| | | |
| | | <select id="selectAllLevelParentByOid" resultType="java.util.HashMap"> |
| | |
| | | SYS_CONNECT_BY_PATH(name, '#') as namePath, |
| | | SYS_CONNECT_BY_PATH(id, '#') as idPath |
| | | from pl_code_classify plcodeclassify |
| | | START WITH parentCodeClassifyOid is null |
| | | START WITH oid = #{parentId} |
| | | CONNECT BY PRIOR OID = parentCodeClassifyOid) codeclassify0 |
| | | where codeclassify0.paths =#{fieldPath} |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | <select id="selectByFieldPath" resultType="java.util.HashMap"> |
| | | select * |
| | | from (select oid, SYS_CONNECT_BY_PATH(id, '/') as paths |
| | | 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 |