Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_ljj' into dev

dev_shibei_match
jianjun 4 years ago
parent
commit
f97a9ee93a
  1. 53
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

53
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

@ -108,41 +108,24 @@
topicContent, topicContent,
type type
FROM FROM
( (
SELECT SELECT
a.ID AS textId, a.ID AS textId,
a.TOPIC_CONTENT AS topicContent, a.TOPIC_CONTENT AS topicContent,
'topic' AS type, 'topic' AS type,
max( a.CREATED_TIME ) AS CREATED_TIME a.CREATED_TIME
FROM FROM
resi_topic a resi_topic a
WHERE INNER JOIN (
a.GROUP_ID = #{groupId} SELECT max( CREATED_TIME ) AS CREATED_TIME
GROUP BY FROM resi_topic
a.GROUP_ID UNION ALL WHERE GROUP_ID = #{groupId}
SELECT AND DEL_FLAG = '0'
a.ID AS textId, ) b ON a.CREATED_TIME = b.CREATED_TIME
a.TITLE AS topicContent, WHERE
'notice' AS type, a.DEL_FLAG = '0'
max( a.CREATED_TIME ) AS CREATED_TIME AND a.GROUP_ID = #{groupId}
FROM ) a
notice a
WHERE
a.GROUP_ID = #{groupId}
GROUP BY
a.GROUP_ID UNION ALL
SELECT
a.ID AS textId,
a.TITLE AS topicContent,
'activity' AS type,
max( a.CREATED_TIME ) AS CREATED_TIME
FROM
group_act_info a
WHERE
a.GROUP_ID = #{groupId}
GROUP BY
a.GROUP_ID
) a
ORDER BY ORDER BY
CREATED_TIME DESC CREATED_TIME DESC
LIMIT 1 LIMIT 1

Loading…
Cancel
Save