Browse Source

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

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

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

@ -224,9 +224,8 @@
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
GROUP BY art.ID
HAVING HAVING
<if test="tagName != null and tagName != ''"> <if test="tagName != null and tagName != ''">
FIND_IN_SET(#{tagName},tags) FIND_IN_SET(#{tagName},tags)
@ -234,7 +233,6 @@
<if test="excludeTagName != null and excludeTagName != ''"> <if test="excludeTagName != null and excludeTagName != ''">
AND !FIND_IN_SET(#{excludeTagName},tags) AND !FIND_IN_SET(#{excludeTagName},tags)
</if> </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}
</select> </select>

Loading…
Cancel
Save