From 02b5015e989fef8878744d50f21a092efa395231 Mon Sep 17 00:00:00 2001 From: 罗元桥 <2376770955@qq.com> Date: 星期三, 16 六月 2021 19:22:26 +0800 Subject: [PATCH] Merge branch 'test_screen' into 'master' --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java | 27 +++++++++++++++++++++------ 1 files changed, 21 insertions(+), 6 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 3838d40..68645a3 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 @@ -5,16 +5,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; -import com.panzhihua.common.model.vos.R; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleDetailAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCommentReplyAppVO; +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.user.AdministratorsUserVO; import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; + +import java.util.List; +import java.util.Map; /** * @auther lyq @@ -109,4 +110,18 @@ " 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}") + 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)") + 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) group by community_id ") + Map<String, Long> sumScreenNum(Long communityId); + + @Select("SELECT release_images FROM com_act_neighbor_circle_comment WHERE community_id = #{communityId} and (status = 2 OR status =3) order by create_at desc limit #{pageSize}") + List<String> screenNeighborCircleImgs(@Param("communityId") Long communityId,@Param("pageSize") Integer pageSize); + +} \ No newline at end of file -- Gitblit v1.7.1