From a429d8ffa31825c7cca7e005bc9ce8f85c15f1f6 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期一, 21 六月 2021 13:26:11 +0800
Subject: [PATCH] 代码合并
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java | 42 +++++++++++++++++++++++++++++++++++++-----
1 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
index f20a336..d85a2f2 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -8,6 +8,7 @@
import com.panzhihua.common.model.vos.neighbor.*;
import com.panzhihua.common.model.vos.screen.CarouselInfoVO;
import com.panzhihua.common.model.vos.screen.ComActNeighborCircleScreenVO;
+import com.panzhihua.common.model.vos.screen.PieElementVO;
import com.panzhihua.common.model.vos.user.AdministratorsUserVO;
import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO;
import org.apache.ibatis.annotations.Mapper;
@@ -110,18 +111,49 @@
" where reply.comment_id = #{commentId} and reply.status = 1")
IPage<ComActNeighborCommentReplyAppVO> neighborCommentReplyByApp(Page page, @Param("commentId") Long commentId);
- @Select("SELECT id,release_content as content FROM com_act_neighbor_circle WHERE community_id =#{communityId} and(status = 2 or status = 3) ORDER BY create_at DESC limit #{pageSize}")
+ @Select("SELECT id,release_content as content FROM com_act_neighbor_circle WHERE community_id =#{communityId} and status = 2 ORDER BY create_at DESC limit #{pageSize}")
List<CarouselInfoVO> screenNeighborCircle(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
@Select(" SELECT COUNT(id) AS totalNum," +
- " (SELECT COUNT(id) FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND (status = 2 OR status = 3) AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " +
- " FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND(status = 2 OR status =3)")
+ " (SELECT COUNT(id) FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND status = 2 AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " +
+ " FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND status = 2")
Map<String, Long> countByCommunityId(@Param("communityId")Long communityId,@Param("nowDate")String nowDate);
- @Select("SELECT SUM(comment_num) as commentNum,SUM(fabulous_num) as fabulousNum,SUM(forward_num) as forwardNum FROM com_act_neighbor_circle WHERE community_id = #{communityId} and (status = 2 OR status =3) ")
+ @Select("SELECT SUM(comment_num) as commentNum,SUM(fabulous_num) as fabulousNum,SUM(forward_num) as forwardNum FROM com_act_neighbor_circle WHERE community_id = #{communityId} and status = 2 ")
Map<String, Object> sumScreenNum(@Param("communityId")Long communityId);
- @Select("SELECT release_images FROM com_act_neighbor_circle WHERE community_id = #{communityId} and (status = 2 OR status =3) order by create_at desc limit #{pageSize}")
+ @Select("SELECT release_images FROM com_act_neighbor_circle WHERE community_id = #{communityId} and status = 2 order by create_at desc limit #{pageSize}")
List<String> screenNeighborCircleImgs(@Param("communityId") Long communityId,@Param("pageSize") Integer pageSize);
+ @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = #{communityId} AND STATUS = 4 " +
+ "UNION ALL " +
+ "SELECT COUNT(id) as num,'微心愿' as name FROM com_act_micro_wish WHERE community_id = #{communityId} AND STATUS = 6 " +
+ "UNION ALL " +
+ "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = #{communityId} " +
+ "UNION ALL " +
+ "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND STATUS = 2 " +
+ "UNION ALL " +
+ "SELECT (SELECT COUNT(id) FROM com_pb_activity WHERE community_id = #{communityId} AND STATUS = 5)+(SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = #{communityId} AND STATUS = 2) as num, '党建工作' as name FROM DUAL " +
+ "UNION ALL " +
+ "SELECT COUNT(id) as num,'社区活动' as name FROM com_act_activity WHERE community_id = #{communityId} AND STATUS = 5 ")
+ List<PieElementVO> countAllCompletedWorkByCommunityId(@Param("communityId")Long communityId);
+
+ @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2) " +
+ "UNION ALL " +
+ "SELECT COUNT(id) as num,'微心愿' as name FROM com_act_micro_wish WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4) " +
+ "UNION ALL " +
+ "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = #{communityId} " +
+ "UNION ALL " +
+ "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND STATUS = 1 " +
+ "UNION ALL " +
+ "SELECT (SELECT COUNT(id) FROM com_pb_activity WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4) )+(SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = #{communityId} AND STATUS = 1) as num ,'党建工作' as name FROM DUAL " +
+ "UNION ALL " +
+ "SELECT COUNT(id),'社区活动' as name FROM com_act_activity WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4) ")
+ List<PieElementVO> countAllNoneCompletedWorkByCommunityId(@Param("communityId")Long communityId);
+
+ @Select(" SELECT AVG(b.t)AS avgTime " +
+ " FROM (SELECT TIMESTAMPDIFF(MINUTE,create_at,feedback_at) AS t FROM com_act_easy_photo WHERE community_id = #{communityId} and STATUS = 4 " +
+ " UNION ALL SELECT TIMESTAMPDIFF(MINUTE,create_at,finish_at) AS t FROM com_act_micro_wish WHERE community_id = #{communityId} and STATUS = 6 " +
+ " )AS b ")
+ Map<String, Object> countAvgByCommunityId(@Param("communityId")Long communityId);
}
\ No newline at end of file
--
Gitblit v1.7.1