From ce4a770744d7a0b4e4ea3b5101556b94e72bdf1c Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期二, 14 十一月 2023 17:49:20 +0800
Subject: [PATCH] 修改打卡

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 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 3680f9e..4c6d97b 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
@@ -121,6 +121,9 @@
     @Update("update com_act_activity set `status`=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),end_at)<=0")
     int updateStatusToBeginActiveOrEnd();
 
+    @Select("select id from com_act_activity   where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0")
+    List<Long> selectBeginIds();
+
 //    @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`, "
@@ -180,8 +183,8 @@
     @Select("SELECT " + " count( caa.id ) as totalNum, "
         + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min = 0 and community_id = ${communityId}) as commonNum, "
         + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min > 0 and community_id = ${communityId}) as volunteerNum, "
-        + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 0 and caa.community_id = ${communityId}) as commonPeopleNum, "
-        + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 1 and caa.community_id = ${communityId}) as volunteerPeopleNum, "
+        + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and caas.sign_identity != 3 and caa.community_id = ${communityId}) as commonPeopleNum, "
+        + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and caas.sign_identity = 3 and caa.community_id = ${communityId}) as volunteerPeopleNum, "
         + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and community_id = ${communityId} and create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now()) as currentNum "
         + "FROM " + " com_act_activity AS caa  " + "WHERE "
         + " caa.`status` IN (1,2,3,4,5) and community_id = ${communityId}")
@@ -308,14 +311,14 @@
      * @param communityId
      * @return
      */
-    PartyActivityStatics selectActivityStatics(Long communityId);
+    PartyActivityStatics selectActivityStatics(@Param("communityIds") List<Long> communityIds);
 
     /**
      * 党员活动饼状图
      * @param communityId
      * @return
      */
-    List<PartyActivityTypeChart> selectActivityChart(Long communityId);
+    List<PartyActivityTypeChart> selectActivityChart(@Param("communityIds") List<Long> communityIds);
 
     /**
      * 党员活动柱状图
@@ -324,7 +327,7 @@
      * @param date
      * @return
      */
-    Integer selectActivityLine(@Param("communityId") Long communityId,@Param("year")String year,@Param("date")String date);
+    Integer selectActivityLine(@Param("communityIds") List<Long> communityIds,@Param("year")String year,@Param("date")String date);
 
     /**
      * 分页查询党员详情活动
@@ -357,4 +360,14 @@
      * @return
      */
     IPage<ComActActivityVO> pageProjectActivity(@Param("page") Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO);
+
+    List<String> selectOpenIdByActivityId(Long id);
+
+    /**
+     * 大屏社区活动列表
+     * @param page
+     * @return
+     */
+    IPage<ComActActivityBigScreenVO> pageActivityBigScreen(@Param("page") Page page);
+
 }

--
Gitblit v1.7.1