From b3c6911c1e78563dc04998dd7bfb510130a9fcec Mon Sep 17 00:00:00 2001 From: huanghongfa <18228131219@163.com> Date: 星期一, 01 二月 2021 16:37:52 +0800 Subject: [PATCH] auth --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 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 bcb902b..72f3fae 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 @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.vos.community.ComActActivityVO; +import com.panzhihua.common.model.vos.community.CommunityActivitiesVO; +import com.panzhihua.common.model.vos.community.CommunityGovernanceTrendsVO; import com.panzhihua.common.model.vos.partybuilding.PageActivityMembersVO; import com.panzhihua.service_community.model.dos.ComActActivityDO; import org.apache.ibatis.annotations.Mapper; @@ -11,6 +13,7 @@ import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; +import java.util.Date; import java.util.List; /** @@ -67,6 +70,12 @@ " </if> " + "<if test='comActActivityVO.beginAt != null '>" + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} \n" + + " </if> " + + "<if test='comActActivityVO.type != null and comActActivityVO.type==1 '>" + + "AND a.volunteer_max!=0 \n" + + " </if> " + + "<if test='comActActivityVO.type != null and comActActivityVO.type==2 '>" + + "AND a.participant_max!=0 \n" + " </if> " + " group by a.id "+ " order by a.status asc,a.publish_at desc "+ @@ -214,4 +223,28 @@ @Update("update com_act_activity set `status`=4 where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0") int updateStatusToBeginAfterSingEnd(); + @Select("select GROUP_CONCAT(t.x1,',',t.x2,',',t.x3,',',t.x4) from (\n" + + "SELECT\n" + + "(select COUNT(d.id) from com_act_discuss d where d.community_id=#{communityId})x1,\n" + + "(select COUNT(w.id) from com_act_micro_wish w where w.community_id=#{communityId})x2,\n" + + "(select COUNT(p.id) from com_act_easy_photo p where p.community_id=#{communityId})x3,\n" + + "\tCOUNT( a.id ) x4\n" + + "FROM\n" + + "\tcom_pb_activity a \n" + + "WHERE\n" + + "\t a.community_id =#{communityId})t") + String selectCommunityGovernanceTrendsVO(Long communityId); + @Select("\n" + + "\tSELECT\n" + + "\t(select COUNT(d.id) from com_act_discuss d where DATE_FORMAT(d.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and d.community_id=#{communityId})discuss,\n" + + "\t(select COUNT(w.id) from com_act_micro_wish w where DATE_FORMAT(w.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and w.community_id=#{communityId})microWish,\n" + + "\t(select COUNT(p.id) from com_act_easy_photo p where DATE_FORMAT(p.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and p.community_id=#{communityId})eashPhoto,\n" + + "\t(select COUNT(pa.id) from com_pb_activity pa where DATE_FORMAT(pa.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and pa.community_id=#{communityId})pbActivity,\n" + + "\t\tCOUNT( a.id ) actActivity\n" + + "\tFROM\n" + + "\t\tcom_pb_activity a \n" + + "\tWHERE\n" + + "\t\tDATE_FORMAT( a.create_at, '%Y-%m-%d' )=DATE_FORMAT(#{date},'%Y-%m-%d') \n" + + "\t\tAND a.community_id =#{communityId}") + CommunityActivitiesVO selectCommunityActivitiesVO(@Param("communityId") Long communityId, @Param("date")Date date); } -- Gitblit v1.7.1