springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java
@@ -158,6 +158,9 @@ @ApiModelProperty(value = "社区id", hidden = true) private Long communityId; @ApiModelProperty(value = "社区id集合", hidden = true) private List<Long> communityIds; @ApiModelProperty(value = "社区名称") private String communityName; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java
@@ -1,6 +1,7 @@ package com.panzhihua.common.model.vos.partybuilding; import java.util.Date; import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; @@ -70,6 +71,9 @@ @ApiModelProperty("社区id") private Long communityId; @ApiModelProperty("社区id集合") private List<Long> communityIds; @ApiModelProperty("动态内容富文本--纯文本") private String contentText; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/west/PartyBuildingComPbDynVO.java
@@ -8,6 +8,7 @@ import lombok.Data; import java.util.Date; import java.util.List; /** * @program: springcloud_k8s_panzhihuazhihuishequ @@ -70,6 +71,11 @@ @JsonSerialize(using = ToStringSerializer.class) private Long communityId; @ApiModelProperty("社区id集合") @JsonSerialize(using = ToStringSerializer.class) private List<Long> communityIds; @ApiModelProperty("动态内容富文本--纯文本") private String contentText; springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -19,6 +19,7 @@ import javax.annotation.Resource; import cn.hutool.core.collection.CollUtil; import com.panzhihua.common.constants.HttpStatus; import com.panzhihua.common.model.dtos.community.ActivityInviteDTO; import com.panzhihua.service_community.dao.ComActNeighborCircleDAO; @@ -882,6 +883,15 @@ } page.setSize(pageSize); page.setCurrent(pageNum); Long communityId = comActActivityVO.getCommunityId(); if (null != communityId){ List<Long> communityIds = comActDAO.selectIds(communityId); if (CollUtil.isEmpty(communityIds)) { communityIds = new ArrayList<>(); communityIds.add(communityId); } comActActivityVO.setCommunityIds(communityIds); } IPage<ComActActivityVO> iPage = comActActivityDAO.pageActivityCommunityBack(page, comActActivityVO); iPage.getRecords().forEach(vo ->{ List<ComActActEvaluateDO> comActActEvaluateDOList = comActActEvaluateDAO springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -88,7 +88,13 @@ <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> left join (select count(t.id) as socialCount,activity_id from com_act_act_regist t LEFT JOIN sys_user t1 on t.user_id = t1.user_id LEFT JOIN com_act_social_worker t2 on t1.phone = t2.telephone where t2.id is not null GROUP BY t.activity_id) so on a.id = so.activity_id </if> WHERE a.community_id=#{comActActivityVO.communityId} WHERE 1=1 <if test="comActActivityVO.communityIds != null and comActActivityVO.communityIds.size() != 0"> and a.community_id in <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> <if test='comActActivityVO.type != null'> AND a.type = #{comActActivityVO.type} </if> springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java
@@ -34,8 +34,9 @@ + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at,t.name as communityName,d.policy_type \n" + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id left join com_act t on d.community_id = t.community_id\n" + "where d.type=#{partyBuildingComPbDynVO.type} \n" + "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>" + "and d.community_id = ${partyBuildingComPbDynVO.communityId} \n" + " </if> " + "<if test='partyBuildingComPbDynVO.communityIds != null and partyBuildingComPbDynVO.communityIds > 0 '>" + " and a.community_id in " + "<foreach item=\"item\" collection=\"partyBuildingComPbDynVO.communityIds\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n" + "#{item}\n" + "</foreach>\n" + " </if> " + "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>" + "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + " </if> " + "<if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>" springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberWestServiceImpl.java
@@ -9,6 +9,7 @@ import javax.annotation.Resource; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.IdcardUtil; import com.google.common.collect.Lists; import com.panzhihua.common.enums.ComPbMemberRoleTypeEnum; @@ -72,6 +73,8 @@ private CommunityWestService communityWestService; @Resource private UserService userService; @Resource private ComPbMemberDAO comPbMemberDAO; /** * 新增党员 @@ -554,6 +557,15 @@ } page.setSize(pageSize); page.setCurrent(pageNum); Long communityId = partyBuildingComPbDynVO.getCommunityId(); if (null != communityId){ List<Long> communityIds = comPbMemberDAO.selectIds(communityId); if (CollUtil.isEmpty(communityIds)) { communityIds = new ArrayList<>(); communityIds.add(communityId); } partyBuildingComPbDynVO.setCommunityIds(communityIds); } IPage<PartyBuildingComPbDynVO> iPage = comPbDynDAO.pageYnamic(page, partyBuildingComPbDynVO); List<PartyBuildingComPbDynVO> records = iPage.getRecords(); if (!(ObjectUtils.isEmpty(records))) {