puhanshu
2022-08-05 26cb89646ebc77ba83ffd0e2d135793778b8877e
bug修改
7个文件已修改
123 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
@@ -48,6 +48,17 @@
        return communityService.pageNeighborByApp(neighborCircleAppDTO);
    }
    @ApiOperation(value = "分页查询可关联清单列表", response = ComActNeighborCircleAppVO.class)
    @PostMapping("pageRelationList")
    public R pageRelationList(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            neighborCircleAppDTO.setPhone(loginUserInfo.getPhone());
            neighborCircleAppDTO.setUserId(loginUserInfo.getUserId());
        }
        return communityService.pageRelationList(neighborCircleAppDTO);
    }
    @ApiOperation(value = "用户发布邻里圈审核")
    @PostMapping("addNeighborByApp")
    public R addNeighborByApp(@RequestBody AddComActNeighborCircleAppDTO addNeighborCircleAppDTO) {
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -10306,4 +10306,12 @@
     */
    @GetMapping("/integral/user/detail")
    R getUserIntegralDetail(@RequestParam("id") Long id);
    /**
     * 分页查询可关联清单列表
     * @param neighborCircleAppDTO
     * @return
     */
    @PostMapping("/neighbor/pageRelationList")
    R pageRelationList(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java
@@ -41,6 +41,16 @@
    }
    /**
     * 分页查询可关联清单列表
     * @param neighborCircleAppDTO
     * @return
     */
    @PostMapping("pageRelationList")
    public R pageRelationList(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) {
        return comActNeighborCircleService.pageRelationList(neighborCircleAppDTO);
    }
    /**
     * 分页查询邻里圈列表
     *
     * @param neighborCircleAppDTO
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -166,4 +166,11 @@
     * @return
     */
    Integer selectCount(@Param("type") Integer type,@Param("phone") String phone,@Param("communityId") Long communityId);
    /**
     * 分页查询可关联清单列表
     * @param neighborCircleAppDTO
     * @return
     */
    IPage<ComActNeighborCircleAppVO> pageRelationList(@Param("userPage") Page userPage, @Param("neighborCircleAppDTO") ComActNeighborCircleAppDTO neighborCircleAppDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleService.java
@@ -263,4 +263,11 @@
     * @return
     */
    R selectCount(@RequestParam("type")Integer type, @RequestParam("phone")String phone,@RequestParam("communityId")Long communityId);
    /**
     * 分页查询可关联清单列表
     * @param neighborCircleAppDTO
     * @return
     */
    R pageRelationList(ComActNeighborCircleAppDTO neighborCircleAppDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -1203,6 +1203,43 @@
    }
    /**
     * 分页查询可关联清单列表
     * @param neighborCircleAppDTO
     * @return
     */
    @Override
    public R pageRelationList(ComActNeighborCircleAppDTO neighborCircleAppDTO) {
        Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize());
        IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageRelationList(userPage, neighborCircleAppDTO);
        if (!doPager.getRecords().isEmpty()) {
            for (ComActNeighborCircleAppVO circleAppVO : doPager.getRecords()) {
                if (neighborCircleAppDTO.getUserId() != null) {
                    // 查询点赞信息
                    ComActNeighborCircleFabulousDO circleFabulousDO =
                            comActNeighborCircleFabulousDAO.selectOne(new QueryWrapper<ComActNeighborCircleFabulousDO>()
                                    .lambda().eq(ComActNeighborCircleFabulousDO::getParentId, circleAppVO.getId())
                                    .eq(ComActNeighborCircleFabulousDO::getUserId, neighborCircleAppDTO.getUserId())
                                    .eq(ComActNeighborCircleFabulousDO::getType, ComActNeighborCircleFabulousDO.type.llq)
                                    .eq(ComActNeighborCircleFabulousDO::getIsEffective,
                                            ComActNeighborCircleFabulousDO.isEffective.yes));
                    if (circleFabulousDO != null) {
                        circleAppVO.setHaveSign(1);
                    } else {
                        circleAppVO.setHaveSign(2);
                    }
                }
                if (circleAppVO.getType() != null && circleAppVO.getType().equals(ComActNeighborCircleDO.type.admin)) {
                    ComActDO actDO = comActDAO.selectById(circleAppVO.getCommunityId());
                    if (actDO != null) {
                        circleAppVO.setName(actDO.getName());
                    }
                }
            }
        }
        return R.ok(doPager);
    }
    /**
     * 判断活动统计列表中是否已有该单位的数据
     * */
    public Map<String,Integer> alreadyAnalysis(Long unitId,List<UnitActivityAnalysisVO> list){
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -410,4 +410,47 @@
            </if>
        </where>
    </select>
    <select id="pageRelationList"
            resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO">
        SELECT
        canc.*,
        su.nick_name as name,
        su.community_id,
        ca.`name` as communityName,
        canct.name as topicName,
        su.image_url as headUrl
        FROM
        com_act_neighbor_circle AS canc
        left join sys_user as su on su.user_id = canc.release_id
        left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id
        left join com_act as ca on ca.community_id = canc.community_id
        LEFT JOIN com_act_activity t ON canc.id = t.relation_id
        where is_del = 2 and canc.status = 2 and canc.community_id = ${neighborCircleAppDTO.communityId} AND t.id IS NULL
        <if test='neighborCircleAppDTO.topicId != null '>
            and canc.topic_id = #{neighborCircleAppDTO.topicId}
        </if>
        <if test='neighborCircleAppDTO.belongType != null '>
            and canc.belong_type = #{neighborCircleAppDTO.belongType}
        </if>
        <if test='neighborCircleAppDTO.keyWord != null and neighborCircleAppDTO.keyWord != &quot;&quot;'>
            and (canct.`name` like concat ('%',#{neighborCircleAppDTO.keyWord},'%') or
            su.nick_name like concat ('%',#{neighborCircleAppDTO.keyWord},'%') or
            canc.release_content like concat ('%',#{neighborCircleAppDTO.keyWord},'%'))
        </if>
        <if test="neighborCircleAppDTO.isHelp ==1">
            and (canc.help_member_content like concat ('%',#{neighborCircleAppDTO.phone},'%') or canc.help_org_content like concat ('%',#{neighborCircleAppDTO.phone},'%') )
        </if>
        <if test="neighborCircleAppDTO.solveStatus !=null">
            <if test="neighborCircleAppDTO.solveStatus ==1">
                and canc.solve_status in (0,1)
            </if>
            <if test="neighborCircleAppDTO.solveStatus ==2">
                and canc.solve_status =2
            </if>
            <if test="neighborCircleAppDTO.solveStatus ==3">
                and canc.solve_status in(3,4)
            </if>
        </if>
        order by canc.create_at desc
    </select>
</mapper>