@ -20,15 +20,15 @@ public interface DirectoryResourceMapper extends BaseMapper<DirectoryResource> {
" SELECT DISTINCT TT.* FROM ("+
" SELECT DISTINCT TT.* FROM ("+
" SELECT * FROM V_DIRECTORY_RESOURCE VDR WHERE DIRECTORY_PATH LIKE (#{dirPath} || '%') AND EXISTS(SELECT 1 FROM B_DIRECTORY D1 WHERE D1.ID = VDR.PARENT_ID AND D1.REVIEW_STATUS IN ('PASS','SUBMITTED'))"+
" SELECT * FROM V_DIRECTORY_RESOURCE VDR WHERE DIRECTORY_PATH LIKE (#{dirPath} || '%') AND EXISTS(SELECT 1 FROM B_DIRECTORY D1 WHERE D1.ID = VDR.PARENT_ID AND D1.REVIEW_STATUS IN ('PASS','SUBMITTED'))"+
" ) TT "+
" ) TT "+
" LEFT JOIN (SELECT B2.*, B1.ENTITY_ID FROM B_DATA_LABEL_ENTITY B1 INNER JOIN B_DATA_LABELS B2 ON B1.LABEL_ID = B2.ID) DLN ON DLN.ENTITY_ID = TT.ID "+
" WHERE 1=1 "+
" <when test='labels != null and labels.size > 0'>"+
" <when test='labels != null and labels.size > 0'>"+
" LEFT JOIN B_DATA_LABEL_ENTITY DLN ON DLN.ENTITY_ID = TT.ID "+
" AND (DLN.ID_PATH LIKE (#{label.idPath + label.id + '/'} || '%') OR DLN.ID = #{label.id})"+
" AND (DLN.ID_PATH LIKE (#{label.idPath} || '%') OR DLN.ID = #{label.id})"+
" </foreach>"+
" </foreach>"+
" </when>"+
" </when>"+
" <when test=\"ew.sqlSegment != null and ew.sqlSegment != '' and ew.sqlSegment != '()'\">"+
" <when test=\"ew.sqlSegment != null and ew.sqlSegment != '' and ew.sqlSegment != '()'\">"+
" ${ew.sqlSegment}"+
" AND ${ew.sqlSegment}"+
" </when>"+
" </when>"+
"</script>")
"</script>")
@ResultType(DirectoryResource.class)
@ResultType(DirectoryResource.class)
@ -38,15 +38,15 @@ public interface DirectoryResourceMapper extends BaseMapper<DirectoryResource> {
" SELECT DISTINCT TT.* FROM ("+
" SELECT DISTINCT TT.* FROM ("+
" SELECT * FROM V_DIRECTORY_RESOURCE VDR WHERE DIRECTORY_PATH LIKE (#{dirPath} || '%') AND EXISTS(SELECT 1 FROM B_DIRECTORY D1 WHERE D1.ID = VDR.PARENT_ID AND D1.REVIEW_STATUS IN ('PASS','SUBMITTED'))"+
" SELECT * FROM V_DIRECTORY_RESOURCE VDR WHERE DIRECTORY_PATH LIKE (#{dirPath} || '%') AND EXISTS(SELECT 1 FROM B_DIRECTORY D1 WHERE D1.ID = VDR.PARENT_ID AND D1.REVIEW_STATUS IN ('PASS','SUBMITTED'))"+
" ) TT "+
" ) TT "+
" LEFT JOIN (SELECT B2.*, B1.ENTITY_ID FROM B_DATA_LABEL_ENTITY B1 INNER JOIN B_DATA_LABELS B2 ON B1.LABEL_ID = B2.ID) DLN ON DLN.ENTITY_ID = TT.ID "+
" WHERE 1=1 "+
" <when test='labels != null and labels.size > 0'>"+
" <when test='labels != null and labels.size > 0'>"+
" LEFT JOIN (SELECT B2.*, B1.ENTITY_ID FROM B_DATA_LABEL_ENTITY B1 INNER JOIN B_DATA_LABELS B2 ON B1.LABEL_ID = B2.ID) DLN ON DLN.ENTITY_ID = TT.ID "+