From 007abfd18e32b28a8509e6d6a7a5990da73a7c14 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 31 Jul 2020 17:34:29 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=97=E8=A1=A8sql=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 | 15 +++++---------- 1 file changed, 5 insertions(+), 10 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 d362229eba..b3d4fb4fe0 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 @@ -65,14 +65,13 @@ 'signing_up' AS actCurrentState, -- 活动状态:报名中,未报满 IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag FROM act_info i - 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 act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled' AND u.USER_ID = #{userId} LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID WHERE i.DEL_FLAG = '0' AND i.ACT_STATUS = 'published' AND = ]]> NOW() -- 报名截止时间 >= 当前时间 AND (i.ACT_QUOTA_CATEGORY = 0 OR i.ACT_QUOTA > IFNULL(c.signupNum, 0)) -- 不限名额或者报名人数未报满 AND i.CUSTOMER_ID = #{customerId} - GROUP BY i.ID ORDER BY i.ACT_QUOTA_CATEGORY DESC,i.CREATED_TIME DESC @@ -92,7 +91,7 @@ 'enough' AS actCurrentState, -- 活动状态:报名中,已报满 IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag FROM act_info i - 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 act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled' AND u.USER_ID = #{userId} LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID WHERE i.DEL_FLAG = '0' AND i.ACT_STATUS = 'published' @@ -100,7 +99,6 @@ AND i.ACT_QUOTA_CATEGORY = 1 -- 固定名额 AND i.ACT_QUOTA = IFNULL(c.signupNum, 0) -- 名额已满 AND i.CUSTOMER_ID = #{customerId} - GROUP BY i.ID ORDER BY i.CREATED_TIME DESC @@ -120,14 +118,13 @@ 'end_sign_up' AS actCurrentState, -- 活动状态:未开始 IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag FROM act_info i - 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 act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled' AND u.USER_ID = #{userId} LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' 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 = 'published' AND i.CUSTOMER_ID = #{customerId} - GROUP BY i.ID ORDER BY i.CREATED_TIME DESC @@ -147,14 +144,13 @@ 'in_progress' AS actCurrentState, -- 活动状态:进行中 IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag FROM act_info i - 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 act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled' AND u.USER_ID = #{userId} 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 i.ACT_STATUS = 'published' AND i.CUSTOMER_ID = #{customerId} - GROUP BY i.ID ORDER BY i.CREATED_TIME DESC @@ -174,12 +170,11 @@ 'finished' AS actCurrentState, -- 活动状态:已结束 IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag FROM act_info i - 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 act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0' AND u.`STATUS` != 'refused' AND u.`STATUS` != 'canceled' AND u.USER_ID = #{userId} 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 = 'finished' AND i.CUSTOMER_ID = #{customerId} - GROUP BY i.ID ORDER BY i.CREATED_TIME DESC LIMIT #{pageNo}, #{pageSize} From 3efc0e00828201f1e8be6cb80ac2d9182f6d8bd0 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 31 Jul 2020 17:44:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=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/PointRuleDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml index 8aa2d8d1e9..3f709bd3b5 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointRuleDao.xml @@ -42,6 +42,6 @@ FROM point_rule WHERE DEL_FLAG = '0' - CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND EVENT_CODE = #{evertCode,jdbcType=VARCHAR} + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND EVENT_CODE = #{eventCode,jdbcType=VARCHAR} \ No newline at end of file From eea94b0e25792119f5ea880e5405b273c604bca6 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 31 Jul 2020 17:46:48 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=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/UserPointActionLogDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml index bc529cc420..3ba551805c 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml @@ -45,7 +45,7 @@ SELECT SUM( POINT ) FROM - USER_POINT_ACTTION + USER_POINT_ACTION_LOG WHERE DEL_FLAG = '0' AND USER_ID = #{userId} From 260a3d07f97831db454dcb4a129cf401c54620fa Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 31 Jul 2020 17:49:24 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=A7=AF=E5=88=86=20+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-point-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-point/epmet-point-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml index 3f44fa403f..fb1d9455d4 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-point-server: container_name: epmet-point-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.14 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.15 ports: - "8112:8112" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml index 6f01ad765a..b410ce31e2 100644 --- a/epmet-module/epmet-point/epmet-point-server/pom.xml +++ b/epmet-module/epmet-point/epmet-point-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - 0.0.14 + 0.0.15 epmet-point com.epmet