Browse Source

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

master
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' art.DEL_FLAG = '0'
AND AND
art.STATUS_FLAG = 'published' art.STATUS_FLAG = 'published'
<if test="(tagName != null and tagName != '') or (excludeTagName != null and excludeTagName != '')">
GROUP BY art.ID
HAVING GROUP BY art.ID
<if test="tagName != null and tagName != ''"> HAVING
FIND_IN_SET(#{tagName},tags) <if test="tagName != null and tagName != ''">
</if> FIND_IN_SET(#{tagName},tags)
<if test="excludeTagName != null and excludeTagName != ''"> </if>
AND !FIND_IN_SET(#{excludeTagName},tags) <if test="excludeTagName != null and excludeTagName != ''">
</if> AND !FIND_IN_SET(#{excludeTagName},tags)
</if> </if>
ORDER BY art.PUBLISH_DATE DESC , art.CREATED_TIME DESC ORDER BY art.PUBLISH_DATE DESC , art.CREATED_TIME DESC
LIMIT #{num} LIMIT #{num}

Loading…
Cancel
Save