| | |
| | | } |
| | | commentDO.setStatus(dto.getStatus()); |
| | | neighborCircleCommentDAO.updateById(commentDO); |
| | | |
| | | //查询邻里圈更新邻里圈评论数量 |
| | | ComActNeighborCircleDO neighborCircleDO = this.baseMapper.selectById(commentDO.getCircleId()); |
| | | if(neighborCircleDO != null){ |
| | | if(dto.getStatus().equals(2)){ |
| | | neighborCircleDO.setCommentNum(neighborCircleDO.getCommentNum() - 1); |
| | | }else if(dto.getStatus().equals(1)){ |
| | | neighborCircleDO.setCommentNum(neighborCircleDO.getCommentNum() + 1); |
| | | } |
| | | this.baseMapper.updateById(neighborCircleDO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |