huanghongfa
2021-05-06 1715cd9041edcfdb80ec74e1cee7bb1e88883169
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -84,8 +84,9 @@
                ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                        new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleAppVO.getId())
                .eq(ComActNeighborCircleFabulousDO::getUserId,neighborCircleAppDTO.getUserId())
                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.llq));
                if(circleFabulousDO != null && circleFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.llq)
                                .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes));
                if(circleFabulousDO != null){
                    circleAppVO.setHaveSign(1);
                }else{
                    circleAppVO.setHaveSign(2);
@@ -139,8 +140,9 @@
        ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleDetailAppVO.getId())
                        .eq(ComActNeighborCircleFabulousDO::getUserId,neighborCircleAppDTO.getUserId())
                        .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.llq));
        if(circleFabulousDO != null && circleFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
                        .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.llq)
                        .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes));
        if(circleFabulousDO != null){
            circleDetailAppVO.setHaveSign(1);
        }else{
            circleDetailAppVO.setHaveSign(2);
@@ -155,8 +157,9 @@
                ComActNeighborCircleFabulousDO circleCommentFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                        new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,circleCommentVo.getId())
                                .eq(ComActNeighborCircleFabulousDO::getUserId,neighborCircleAppDTO.getUserId())
                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.pl));
                if(circleCommentFabulousDO != null && circleCommentFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.pl)
                                .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes));
                if(circleCommentFabulousDO != null){
                    circleCommentVo.setHaveSign(1);
                }else{
                    circleCommentVo.setHaveSign(2);
@@ -169,8 +172,9 @@
                        ComActNeighborCircleFabulousDO circleReplyFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                                new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,commentReplyVO.getId())
                                        .eq(ComActNeighborCircleFabulousDO::getUserId,neighborCircleAppDTO.getUserId())
                                        .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.hf));
                        if(circleReplyFabulousDO != null && circleReplyFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
                                        .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.hf)
                                        .eq(ComActNeighborCircleFabulousDO::getIsEffective,ComActNeighborCircleFabulousDO.isEffective.yes));
                        if(circleReplyFabulousDO != null){
                            commentReplyVO.setHaveSign(1);
                        }else{
                            commentReplyVO.setHaveSign(2);
@@ -592,6 +596,13 @@
            if(circleFabulousDO == null){
                return R.fail("未查询到点赞信息");
            }
            //减少邻里圈点赞数量
            ComActNeighborCircleDO neighborCircleDO = this.baseMapper.selectById(fabulousAppDTO.getServiceId());
            if(neighborCircleDO != null){
                neighborCircleDO.setFabulousNum(neighborCircleDO.getFabulousNum() - 1);
                this.baseMapper.updateById(neighborCircleDO);
            }
        }else if(fabulousAppDTO.getType().equals(ComActNeighborFabulousAppDTO.type.pl)){
            circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                    new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,fabulousAppDTO.getServiceId())
@@ -601,6 +612,13 @@
            if(circleFabulousDO == null){
                return R.fail("未查询到点赞信息");
            }
            //减少邻里圈评论点赞数量
            ComActNeighborCircleCommentDO circleCommentDO = comActNeighborCircleCommentDAO.selectById(fabulousAppDTO.getServiceId());
            if(circleCommentDO != null){
                circleCommentDO.setFabulousNum(circleCommentDO.getFabulousNum() - 1);
                comActNeighborCircleCommentDAO.updateById(circleCommentDO);
            }
        }else if(fabulousAppDTO.getType().equals(ComActNeighborFabulousAppDTO.type.hf)){
            circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
                    new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,fabulousAppDTO.getServiceId())
@@ -610,6 +628,12 @@
            if(circleFabulousDO == null){
                return R.fail("未查询到点赞信息");
            }
            //减少邻里圈评论回复点赞数量
            ComActNeighborCircleCommentReplyDO circleCommentReplyDO = comActNeighborCircleCommentReplyDAO.selectById(fabulousAppDTO.getServiceId());
            if(circleCommentReplyDO != null){
                circleCommentReplyDO.setFabulousNum(circleCommentReplyDO.getFabulousNum() - 1);
                comActNeighborCircleCommentReplyDAO.updateById(circleCommentReplyDO);
            }
        }
        if(circleFabulousDO != null){
            circleFabulousDO.setIsEffective(ComActNeighborCircleFabulousDO.isEffective.no);