huanghongfa
2021-04-30 b6169fae531465dc60f3b5c8f841eb2dd7009eec
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -188,6 +188,11 @@
    public R pageNeighborByAdmin(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) {
        Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize());
        IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByAdmin(page, neighborCircleAdminDTO);
        doPager.getRecords().forEach(data->{
            if(data.getUserType()!=1){
                data.setReleaseName(data.getCommunityName());
            }
        });
        return R.ok(doPager);
    }
@@ -224,7 +229,9 @@
            return R.fail("id有误!");
        }
        neighborCircleDO.setStatus(editVO.getStatus());
        neighborCircleDO.setRefuseReason(editVO.getRefuseReason());
        if(editVO.getRefuseReason()!=null){
            neighborCircleDO.setRefuseReason(editVO.getRefuseReason());
        }
        this.baseMapper.updateById(neighborCircleDO);
        return R.ok();
    }
@@ -452,9 +459,9 @@
        //邻里圈浏览器记录
        neighborCircleBrowseDAO.delete(new LambdaQueryWrapper<ComActNeighborCircleBrowseDO>()
                .eq(ComActNeighborCircleBrowseDO::getNeighborId, id));
        //邻里圈点赞删除 需要一层一层删
/*        neighborCircleFabulousDAO.delete(new LambdaQueryWrapper<ComActNeighborCircleFabulousDO>()
                .eq(ComActNeighborCircleFabulousDO::get))*/
        //邻里圈点赞删除
        neighborCircleFabulousDAO.delete(new LambdaQueryWrapper<ComActNeighborCircleFabulousDO>()
                .eq(ComActNeighborCircleFabulousDO::getCircleId,id));
        return R.ok();
    }
@@ -501,8 +508,10 @@
        if(commentDO==null){
            return R.fail("id有误!");
        }
        AdministratorsUserVO user = this.baseMapper.selectUserByUserId(commentDO.getUserId());
        ComActNeighborCommentByAdminVO vo = new ComActNeighborCommentByAdminVO();
        BeanUtils.copyProperties(commentDO,vo);
        vo.setUserName(user.getName());
        return R.ok(vo);
    }
@@ -510,6 +519,9 @@
    public R detailNeighborCommentAllReply(DetailNeighborCommentReplyByAdminDTO dto) {
        Page<ComActNeighborCircleCommentReplyDO> page = new Page<>(dto.getPageNum(),dto.getPageSize());
        Page<ComActNeighborCommentReplyByAdminVO> replyPage = neighborCircleCommentReplyDAO.selectListByComment(page, dto);
        replyPage.getRecords().forEach(reply->{
        });
        return R.ok(replyPage);
    }
@@ -519,8 +531,11 @@
        if(replyDO==null){
            return R.fail("id有误!");
        }
        AdministratorsUserVO user = this.baseMapper.selectUserByUserId(replyDO.getUserId());
        ComActNeighborCommentReplyByAdminVO vo = new ComActNeighborCommentReplyByAdminVO();
        BeanUtils.copyProperties(replyDO,vo);
        vo.setUserName(user.getName());
        vo.setUserPhone(user.getPhone());
        return R.ok(vo);
    }