From de1b433436014b539a7cf405a614d837f88f70c1 Mon Sep 17 00:00:00 2001
From: CeDo <cedoogle@gmail.com>
Date: 星期六, 08 五月 2021 16:59:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
index 69dd248..df287aa 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -553,6 +553,17 @@
         }
         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{
+                neighborCircleDO.setCommentNum(neighborCircleDO.getCommentNum() + 1);
+            }
+            this.baseMapper.updateById(neighborCircleDO);
+        }
         return R.ok();
     }
 

--
Gitblit v1.7.1