yanghui
2022-10-20 bddad8b22f9b505274a8c2904d9d81efda89f497
Merge branch 'local_20221014' into huacheng_test

# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
4个文件已修改
24 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleAdminDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleAdminDTO.java
@@ -1,6 +1,7 @@
package com.panzhihua.common.model.dtos.neighbor;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -51,4 +52,7 @@
    private Long topicId;
    private Integer solveStatus;
    @ApiModelProperty(value = "社区id集合", hidden = true)
    private List<Long> communityIds;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java
@@ -115,4 +115,7 @@
    @Select("select community_id from com_act where street_id=#{id}")
    List<Long> selectCommunityByStreetId(Long id);
    @Select("SELECT  caa.community_id FROM com_act caa WHERE caa.`name` = ( select ca.`name` FROM com_act ca WHERE ca.community_id =#{id})")
    List<Long> selectIds(@Param("id") Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -2,6 +2,9 @@
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.PageUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.PageUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -332,6 +335,14 @@
    @Override
    public R pageNeighborByAdmin(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) {
        Long communityId = neighborCircleAdminDTO.getCommunityId();
        List<Long> communityIds = comActDAO.selectIds(communityId);
        if (CollUtil.isEmpty(communityIds)) {
            communityIds = new ArrayList<>();
            communityIds.add(communityId);
        }
        neighborCircleAdminDTO.setCommunityIds(communityIds);
        Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize());
        IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByAdmin(page, neighborCircleAdminDTO);
        doPager.getRecords().forEach(data -> {
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -95,7 +95,11 @@
        LEFT JOIN sys_user u ON nc.release_id = u.user_id
        LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id
        <where>
            nc.community_id = ${neighborCircleAdminDTO.communityId} and is_del = 2
            nc.community_id in
            <foreach collection="neighborCircleAdminDTO.communityIds" item="item" index="index" open="(" separator="," close=")">
                ${item}
            </foreach>
            and is_del = 2
            <if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != &quot;&quot;'>
                and nc.release_content like concat('%',#{neighborCircleAdminDTO.releaseContent},'%')
            </if>