作者 tangxvhui

调整查询 文章评论列表

@@ -37,10 +37,12 @@ func (l *MiniListArticleCommentLogic) MiniListArticleComment(req *types.MiniList @@ -37,10 +37,12 @@ func (l *MiniListArticleCommentLogic) MiniListArticleComment(req *types.MiniList
37 WithOffsetLimit(req.Page, req.Size). 37 WithOffsetLimit(req.Page, req.Size).
38 MustWithKV("topId", 0). 38 MustWithKV("topId", 0).
39 MustWithKV("articleId", req.ArticleId). 39 MustWithKV("articleId", req.ArticleId).
40 - MustWithKV("sectionId", req.SectionId).  
41 - MustWithKV("show", domain.CommentShowEnable). 40 + MustWithKV("show", int(domain.CommentShowEnable)).
42 MustWithKV("companyId", req.CompanyId) 41 MustWithKV("companyId", req.CompanyId)
43 - 42 + if req.SectionId > 0 {
  43 + //专门获取段落评论
  44 + queryOption.MustWithKV("sectionId", req.SectionId)
  45 + }
44 cnt, commentList, err := l.svcCtx.ArticleCommentRepository.Find(l.ctx, conn, queryOption) 46 cnt, commentList, err := l.svcCtx.ArticleCommentRepository.Find(l.ctx, conn, queryOption)
45 if err != nil { 47 if err != nil {
46 return nil, xerr.NewErrMsgErr("获取评论信息失败", err) 48 return nil, xerr.NewErrMsgErr("获取评论信息失败", err)