|
@ -60,19 +60,16 @@ |
|
|
AND a.STATUS_FLAG = 'published' |
|
|
AND a.STATUS_FLAG = 'published' |
|
|
AND a.CUSTOMER_ID = #{customerId} |
|
|
AND a.CUSTOMER_ID = #{customerId} |
|
|
<if test="tagIdList !=null and tagIdList.size() > 0"> |
|
|
<if test="tagIdList !=null and tagIdList.size() > 0"> |
|
|
AND EXISTS ( |
|
|
<foreach collection="tagIdList" item="tagId" separator=" "> |
|
|
SELECT DISTINCT |
|
|
AND EXISTS( |
|
|
at.ARTICLE_ID |
|
|
SELECT 1 |
|
|
FROM article_tags at |
|
|
FROM ARTICLE_TAGS |
|
|
WHERE at.DEL_FLAG = '0' |
|
|
WHERE DEL_FLAG = '0' |
|
|
AND at.ARTICLE_ID = a.ID |
|
|
AND ARTICLE_ID = a.ID |
|
|
<foreach item="tagId" collection="tagIdList" open="AND (" separator="and" close=")" index=""> |
|
|
AND TAG_ID=#{tagId} |
|
|
at.TAG_ID = #{tagId} |
|
|
) |
|
|
</foreach> |
|
|
</foreach> |
|
|
) |
|
|
|
|
|
</if> |
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ORDER BY PUBLISH_DATE DESC, UPDATED_TIME DESC |
|
|
ORDER BY PUBLISH_DATE DESC, UPDATED_TIME DESC |
|
|
</select> |
|
|
</select> |
|
|
<select id="selectArticleListForGrid" resultType="com.epmet.dto.result.PublishedListResultDTO"> |
|
|
<select id="selectArticleListForGrid" resultType="com.epmet.dto.result.PublishedListResultDTO"> |
|
@ -118,16 +115,15 @@ |
|
|
</foreach> |
|
|
</foreach> |
|
|
) t |
|
|
) t |
|
|
<if test="tagIdList !=null and tagIdList.size() > 0"> |
|
|
<if test="tagIdList !=null and tagIdList.size() > 0"> |
|
|
AND EXISTS ( |
|
|
<foreach collection="tagIdList" item="tagId" separator=" "> |
|
|
SELECT DISTINCT |
|
|
AND EXISTS( |
|
|
at.ARTICLE_ID |
|
|
SELECT 1 |
|
|
FROM article_tags at |
|
|
FROM ARTICLE_TAGS |
|
|
WHERE at.DEL_FLAG = '0' |
|
|
WHERE DEL_FLAG = '0' |
|
|
AND at.ARTICLE_ID = t.articleId |
|
|
AND ARTICLE_ID = a.ID |
|
|
<foreach item="tagId" collection="tagIdList" open="AND (" separator="and" close=")" index=""> |
|
|
AND TAG_ID=#{tagId} |
|
|
at.TAG_ID = #{tagId} |
|
|
) |
|
|
</foreach> |
|
|
</foreach> |
|
|
) |
|
|
|
|
|
</if> |
|
|
</if> |
|
|
ORDER BY publishDate DESC, UPDATED_TIME DESC |
|
|
ORDER BY publishDate DESC, UPDATED_TIME DESC |
|
|
</select> |
|
|
</select> |
|
|