From 69940b4e8538b569540ee9338ec6dc56a5323f03 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 31 Jul 2020 16:36:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=97=E8=A1=A8sql=20?= =?UTF-8?q?=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 | 11 +++++------ 1 file changed, 5 insertions(+), 6 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 28b8d0c064..d362229eba 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 @@ -125,7 +125,7 @@ WHERE i.DEL_FLAG = '0' -- 活动开始时间 > 当前时间 并且 报名截止时间 < 当前时间 报名已结束,活动未开始 未开始 AND ( ]]> NOW() AND NOW() ) - AND i.ACT_STATUS != 'canceled' + AND i.ACT_STATUS = 'published' AND i.CUSTOMER_ID = #{customerId} GROUP BY i.ID ORDER BY i.CREATED_TIME DESC @@ -150,9 +150,9 @@ LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled' LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` = 'passed' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID WHERE i.DEL_FLAG = '0' - -- 活动开始时间 <= 当前时间 并且活动结束时间 >= 当前时间 进行中 - AND ( NOW() AND = ]]> NOW() ) - AND i.ACT_STATUS != 'canceled' + -- 活动开始时间 <= 当前时间 进行中 + AND NOW() + AND i.ACT_STATUS = 'published' AND i.CUSTOMER_ID = #{customerId} GROUP BY i.ID ORDER BY i.CREATED_TIME DESC @@ -177,8 +177,7 @@ LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled' LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` = 'passed' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID WHERE i.DEL_FLAG = '0' - AND i.ACT_STATUS != 'canceled' - AND NOW() + AND i.ACT_STATUS = 'finished' AND i.CUSTOMER_ID = #{customerId} GROUP BY i.ID ORDER BY i.CREATED_TIME DESC