From ae669d20c7e42fef2478cf8ce0824f1b05684d0b Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期六, 18 九月 2021 15:44:30 +0800 Subject: [PATCH] 身份认证缺失接口开发 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussCommentDAO.java | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 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 c16b240..b9e917a 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 @@ -1,12 +1,17 @@ package com.panzhihua.service_community.dao; +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; import com.panzhihua.common.model.vos.community.ComActDiscussCommentVO; import com.panzhihua.service_community.model.dos.ComActDiscussCommentDO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Select; - -import java.util.List; /** * @program: springcloud_k8s_panzhihuazhihuishequ @@ -29,7 +34,7 @@ @Select("" + "SELECT\n" + "u.`name` userName,\n" + - "u.`nick_name` userNickName,\n" + + "IFNULL(u.`nick_name`,'社区管理员') as userNickName,\n" + "u.`image_url`,\n" + "u.phone,\n" + "c.`comment`,\n" + @@ -51,4 +56,12 @@ "ORDER BY\n" + "create_at desc") List<ComActDiscussCommentVO> selectChilds(Long id); + + /** + * 该评论下所有回复内容 + * @param page 分页参数 + * @param id 评论id + * @return 回复列表 + */ + IPage<ComActDiscussCommentVO> getDiscussCommentList(Page page, @Param("id") Long id); } -- Gitblit v1.7.1