From 1775bb71f952106c58657cf02891cbe2a286c8f8 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期三, 22 九月 2021 11:30:47 +0800
Subject: [PATCH] Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussCommentDAO.java |   68 +++++++++++++++++++++------------
 1 files changed, 43 insertions(+), 25 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussCommentDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussCommentDAO.java
index c3da43f..729aa49 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussCommentDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussCommentDAO.java
@@ -2,7 +2,11 @@
 
 import java.util.List;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -27,29 +31,43 @@
 //            " </if> " +
 //            " </where>" +
 //            "</script>")
-    @Select("" +
-            "SELECT\n" +
-            "u.`name` userName,\n" +
-            "IFNULL(u.`nick_name`,'社区管理员') as userNickName,\n" +
-            "u.`image_url`,\n" +
-            "u.phone,\n" +
-            "c.`comment`,\n" +
-            "c.`parent_id`,\n" +
-            "c.`is_author`,\n" +
-            "c.`is_topping`,\n" +
-            "COUNT( cu.id ) num,\n" +
-            "c.create_at,\n" +
-            "c.id \n" +
-            "FROM\n" +
-            "com_act_discuss_comment c\n" +
-            "JOIN sys_user u ON c.user_id = u.user_id\n" +
-            "LEFT JOIN com_act_discuss_comment_user cu on c.id=cu.disscuss_comment_id\n" +
-            "WHERE\n" +
-            "FIND_IN_SET(\n" +
-            "\tc.id,\n" +
-            "getChildren ( #{id} )) and c.parent_id !=0 \n" +
-            "GROUP BY c.id\n" +
-            "ORDER BY\n" +
-            "create_at desc")
-    List<ComActDiscussCommentVO> selectChilds(Long id);
+//    @Select("" +
+//            "SELECT\n" +
+//            "u.`name` userName,\n" +
+//            "IFNULL(u.`nick_name`,'社区管理员') as userNickName,\n" +
+//            "u.`image_url`,\n" +
+//            "u.phone,\n" +
+//            "c.`comment`,\n" +
+//            "c.`parent_id`,\n" +
+//            "c.`is_author`,\n" +
+//            "c.`is_topping`,\n" +
+//            "COUNT( cu.id ) num,\n" +
+//            "c.create_at,\n" +
+//            "c.id \n" +
+//            "FROM\n" +
+//            "com_act_discuss_comment c\n" +
+//            "JOIN sys_user u ON c.user_id = u.user_id\n" +
+//            "LEFT JOIN com_act_discuss_comment_user cu on c.id=cu.disscuss_comment_id\n" +
+//            "WHERE\n" +
+//            "FIND_IN_SET(\n" +
+//            "\tc.id,\n" +
+//            "getChildren ( #{id} )) and c.parent_id !=0 \n" +
+//            "GROUP BY c.id\n" +
+//            "ORDER BY\n" +
+//            "create_at desc")
+
+    /**
+     * 获取子评论
+     * @param parentId
+     * @return
+     */
+    List<ComActDiscussCommentVO> selectChilds(@Param("parentId") Long parentId);
+
+    /**
+     * 该评论下所有回复内容
+     * @param page  分页参数
+     * @param id    评论id
+     * @return  回复列表
+     */
+    IPage<ComActDiscussCommentVO> getDiscussCommentList(Page page, @Param("id") Long id);
 }

--
Gitblit v1.7.1