From 874aa1de0ff6075b75d7353bfe7ca5aa5a67d7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98hanzhixiao=E2=80=99?= <‘709674996@qq.com’> Date: Fri, 14 Jul 2023 11:57:29 +0800 Subject: [PATCH] bug --- pkg/common/db/unrelation/msg.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index 5d26d45b2..f0fa9d25a 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -1196,5 +1196,7 @@ func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessa msgs = append(msgs, msg) } } + start := (req.Pagination.PageNumber - 1) * req.Pagination.ShowNumber + msgs = msgs[start : start+req.Pagination.ShowNumber] return msgs, nil }