| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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()) |
| | |
| | | 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()) |
| | |
| | | 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); |