From 16022f1fc25ae20171c143a0590516d3db550f41 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 13 Aug 2020 14:34:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=9B=9E=E9=A1=BE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/ActInfoDao.xml | 88 ++++++++++++------- 1 file changed, 56 insertions(+), 32 deletions(-) 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}