diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index ea1f6501d9..20bc885ec1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -343,22 +343,34 @@ SELECT - i.ID actId, - i.TITLE title, - i.COVER_PIC coverPic, - DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, - DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, - i.ACT_ADDRESS actAddress, - 'finished' actCurrentState - FROM act_info i - LEFT JOIN act_live_rec r ON r.ACT_ID = i.ID AND r.DEL_FLAG = '0' - WHERE i.DEL_FLAG = '0' - AND i.SUMMARY_FLAG = 1 OR r.ID is NOT NULL - AND i.CUSTOMER_ID = #{customerId} - AND i.ACT_STATUS = 'finished' - GROUP BY i.ID - ORDER BY i.CREATED_TIME DESC - LIMIT 0, #{num} + a.actId, + a.title, + a.coverPic, + a.actStartTime, + a.actEndTime, + a.actAddress, + a.actCurrentState + FROM( + SELECT + i.ID actId, + i.CUSTOMER_ID, + i.TITLE title, + i.COVER_PIC coverPic, + DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, + DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, + i.ACT_ADDRESS actAddress, + 'finished' actCurrentState, + i.CREATED_TIME + FROM act_info i + LEFT JOIN act_live_rec r ON r.ACT_ID = i.ID AND r.DEL_FLAG = '0' + WHERE i.DEL_FLAG = '0' + AND i.SUMMARY_FLAG = 1 OR r.ID is NOT NULL + AND i.ACT_STATUS = 'finished' + GROUP BY i.ID + ) a + WHERE a.CUSTOMER_ID = #{customerId} + ORDER BY a.CREATED_TIME DESC + LIMIT 0, #{num}