From f1b73769d9c0fe6153ad50b3b8016f42e867fcd7 Mon Sep 17 00:00:00 2001 From: "xiao.ming" <1210919685@qq.com> Date: Fri, 12 Nov 2021 17:25:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E8=AE=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9F=A5=E8=AF=A2=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/wt/wt_comments.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/service/wt/wt_comments.go b/service/wt/wt_comments.go index 40ad141..644f639 100755 --- a/service/wt/wt_comments.go +++ b/service/wt/wt_comments.go @@ -52,6 +52,12 @@ func (wtCommentService *WtCommentService)GetWtCommentInfoList(info wtReq.WtComme if err!=nil { return } - err = db.Limit(limit).Offset(offset).Find(&wtComments).Error + + if info.ReportId > 0 { + err = db.Where("report_id=?", info.ReportId).Limit(limit).Offset(offset).Find(&wtComments).Error + }else { + err = db.Limit(limit).Offset(offset).Find(&wtComments).Error + } + return err, wtComments, total }