正在显示
1 个修改的文件
包含
5 行增加
和
3 行删除
@@ -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) |
-
请 注册 或 登录 后发表评论