From 9f2153c7d97b375f0a9913beed65350d1e9fc0c4 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期五, 30 四月 2021 15:20:10 +0800
Subject: [PATCH] 邻里圈bug解决

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 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 286a03f..f537bdf 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
@@ -636,4 +636,30 @@
         }
         return R.ok();
     }
+
+    /**
+     * 分页查询评论下所有回复
+     * @param commentReplyAppDTO    请求参数
+     * @return  回复列表
+     */
+    @Override
+    public R neighborCommentReplyByApp(ComActNeighborCommentReplyAppDTO commentReplyAppDTO){
+        IPage<ComActNeighborCommentReplyAppVO> neighborCircleIPage = this.baseMapper.neighborCommentReplyByApp(
+                new Page<>(commentReplyAppDTO.getPageNum(),commentReplyAppDTO.getPageSize()),commentReplyAppDTO.getCommentId());
+        if(!neighborCircleIPage.getRecords().isEmpty()){
+            for (ComActNeighborCommentReplyAppVO commentReplyAppVO:neighborCircleIPage.getRecords()) {
+                //查询点赞信息
+                ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne(
+                        new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId,commentReplyAppVO.getId())
+                                .eq(ComActNeighborCircleFabulousDO::getUserId,commentReplyAppDTO.getUserId())
+                                .eq(ComActNeighborCircleFabulousDO::getType,ComActNeighborCircleFabulousDO.type.hf));
+                if(circleFabulousDO != null && circleFabulousDO.getIsEffective().equals(ComActNeighborCircleFabulousDO.isEffective.yes)){
+                    commentReplyAppVO.setHaveSign(1);
+                }else{
+                    commentReplyAppVO.setHaveSign(2);
+                }
+            }
+        }
+        return R.ok(neighborCircleIPage);
+    }
 }

--
Gitblit v1.7.1