From 1775bb71f952106c58657cf02891cbe2a286c8f8 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期三, 22 九月 2021 11:30:47 +0800
Subject: [PATCH] Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
index 14e39f5..5a3d820 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -38,12 +38,13 @@
     // " </if> " +
     // " </where>" +
     // "</script>")
-    @Select("<script> " + "SELECT  " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, " + "a.activity_addr, "
-        + "a.`status`, " + "a.publish_at, " + "a.begin_at, " + "a.cover, " + "a.end_at, " + "a.volunteer_max, "
+    @Select("<script> " + "SELECT  " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, "
+        + "a.activity_addr, " + "a.aattend_people,"
+        + "a.`status`, " + "a.is_qr_code, " + "a.publish_at, " + "a.begin_at, " + "a.cover, " + "a.end_at, " + "a.volunteer_max, "
         + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, "
         + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.participant_max, " + "a.sign_up_begin, "
         + "a.sign_up_end, " + "ca.name as communityName  " + "FROM " + "com_act_activity a  "
-        + "join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id  "
+        + "left join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id  "
         + "left join com_act ca on a.community_id=ca.community_id  " + " where 1=1 " +
 
         "<if test='comActActivityVO.choice == 0 '>" + "AND a.community_id=#{comActActivityVO.communityId} " + " </if> "
@@ -67,7 +68,7 @@
     @Select("SELECT  " + "u.name sponsorName, " + "ca.name communityName, "
         + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, "
         + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.*  " + "FROM  " + "com_act_activity a  "
-        + "join sys_user u on a.sponsor_id=u.user_id  " + "left join com_act_act_sign s on a.id=s.activity_id  "
+        + "left join sys_user u on a.sponsor_id=u.user_id  " + "left join com_act_act_sign s on a.id=s.activity_id  "
         + "left join com_act ca on a.community_id=ca.community_id  " + "where a.id=#{id}  " + " group by a.id ")
     ComActActivityVO inforActivity(Long id);
 
@@ -94,19 +95,19 @@
         + "</foreach> " + "</script>")
     int updateIdBatch(@Param("longs") List<Long> longs);
 
-    @Update("update com_act_activity set `status`=2 where `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),publish_at)<=0")
+    @Update("update com_act_activity set `status`=3 where `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),publish_at)<=0")
     int updateStatusToNotBegin();
 
     @Update("update com_act_activity set `status`=3 where `status`=2 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_begin)<=0")
     int updateStatusToBeginSign();
 
-    @Update("update com_act_activity set `status`=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0")
+    @Update("update com_act_activity set `status`=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),end_at)<=0")
     int updateStatusToBeginActiveOrEnd();
 
     @Select("<script> " + "select t.* from ( " + "SELECT  " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, "
         + "a.activity_addr, " + "a.participant_max, " + "count(if(s.is_volunteer=1,null,s.id))participant_now, "
         + "a.volunteer_max, " + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, "
-        + "a.publish_at, " + "a.begin_at, " + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM "
+        + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM "
         + " com_act_activity a  " + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id "
         + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + "WHERE "
         + "  a.`status` = 1 and a.community_id=#{comActActivityVO.communityId} "
@@ -118,7 +119,7 @@
         + " </if> " + "group by a.id " + "  " + " union all " + "select t1.* from ( " + "  " + " SELECT  " + "a.id, "
         + "a.activity_name, " + "u.`name` sponsorName, " + "a.activity_addr, " + "a.participant_max, "
         + "count(if(s.is_volunteer=1,null,s.id))participant_now, " + "a.volunteer_max, "
-        + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " + "a.publish_at, " + "a.begin_at, "
+        + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, "
         + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " + " com_act_activity a  "
         + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id "
         + "WHERE " + "  a.`status` != 1 and a.community_id=#{comActActivityVO.communityId} "
@@ -131,7 +132,7 @@
     IPage<ComActActivityVO> pageActivityCommunityBack(Page page,
         @Param("comActActivityVO") ComActActivityVO comActActivityVO);
 
-    @Select("select id from com_act_activity where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0")
+    @Select("select id from com_act_activity where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),end_at)<=0")
     List<Long> getActivityEndIds();
 
     @Update("update com_act_activity set `status`=4 where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0")

--
Gitblit v1.7.1