Browse Source

使用group_concat 必须加group by 否则默认按照 concat字段分组

dev_shibei_match
jianjun 4 years ago
parent
commit
61f28b9008
  1. 16
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml

16
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml

@ -224,16 +224,14 @@
art.DEL_FLAG = '0'
AND
art.STATUS_FLAG = 'published'
<if test="(tagName != null and tagName != '') or (excludeTagName != null and excludeTagName != '')">
GROUP BY art.ID
HAVING
<if test="tagName != null and tagName != ''">
FIND_IN_SET(#{tagName},tags)
</if>
<if test="excludeTagName != null and excludeTagName != ''">
AND !FIND_IN_SET(#{excludeTagName},tags)
</if>
GROUP BY art.ID
HAVING
<if test="tagName != null and tagName != ''">
FIND_IN_SET(#{tagName},tags)
</if>
<if test="excludeTagName != null and excludeTagName != ''">
AND !FIND_IN_SET(#{excludeTagName},tags)
</if>
ORDER BY art.PUBLISH_DATE DESC , art.CREATED_TIME DESC
LIMIT #{num}

Loading…
Cancel
Save