From 08d38fab4e81e780a5edef7ca02d66b1dc29991c Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期一, 24 十月 2022 14:11:14 +0800 Subject: [PATCH] Merge branch 'local_20221024' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml | 8 +++++++- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java | 2 +- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java | 6 +++--- 3 files changed, 11 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 5785c84..c335557 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 @@ -327,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); /** * 分页查询党员详情活动 diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java index 783609a..2ff9ea9 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java @@ -1266,7 +1266,7 @@ } } partyActivityStatics.setPartyActivityTypeChartList(partyActivityTypeChart); - partyActivityStatics.setPartyActivityLines(getPoints(communityId,year)); + partyActivityStatics.setPartyActivityLines(getPoints(communityIds,year)); return R.ok(partyActivityStatics); } @@ -1280,7 +1280,7 @@ return R.ok(comActActivityDAO.exportPartyMemberDetail(commonPage)); } - public List<PartyActivityLine> getPoints(Long communityId,String year){ + public List<PartyActivityLine> getPoints(List<Long> communityIds,String year){ List<PartyActivityLine> partyActivityLines=new ArrayList<>(); for(int i=1;i<=12;i++){ String x=""; @@ -1292,7 +1292,7 @@ } PartyActivityLine partyActivityLine=new PartyActivityLine(); partyActivityLine.setX(i+"月"); - Integer y=this.comActActivityDAO.selectActivityLine(communityId,year,x); + Integer y=this.comActActivityDAO.selectActivityLine(communityIds,year,x); partyActivityLine.setY(y); partyActivityLines.add(partyActivityLine); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml index fda6fc5..fdfcd95 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml @@ -286,7 +286,13 @@ </select> <select id="selectActivityLine" resultType="integer"> - select count(*) from com_act_activity where type = 3 and publish_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at and community_id =#{communityId} + select count(*) from com_act_activity where type = 3 and publish_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at + <if test="communityIds != null and communityIds.size() != 0"> + and community_id in + <foreach collection="communityIds" item="item" open="(" separator="," close=")"> + #{item} + </foreach> + </if> </select> <select id="partyMemberDetail" resultType="com.panzhihua.common.model.vos.community.PartyMemberDetailVO"> -- Gitblit v1.7.1