Merge pull request #38 from maxbad/v2.0

FIX:顶部消息获取不到列表
This commit is contained in:
孟帅 2023-07-14 21:53:57 +08:00 committed by GitHub
commit 67bf2e9189
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,7 @@ func (s *sAdminNotice) PullMessages(ctx context.Context, in adminin.PullMessages
res.NoticeUnreadCountModel = unread
}
if err = s.Model(ctx).WhereIn("id", messageIds).Limit(in.Limit).Order("id desc").Scan(&res.List); err != nil {
if err = s.Model(ctx, &handler.Option{FilterAuth: false}).WhereIn("id", messageIds).Limit(in.Limit).Order("id desc").Scan(&res.List); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return
}