diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index 6e339a86a..f4f609de0 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -338,6 +338,8 @@ func (m *MsgMongoDriver) RangeUserSendCount(ctx context.Context, start time.Time "$gte": bson.A{ "$$item.msg.send_time", start.UnixMilli(), }, + }, + bson.M{ "$lt": bson.A{ "$$item.msg.send_time", end.UnixMilli(), },