From aaa1fb29cd8eb3f7c189c445703cef5de4eb7eb4 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Tue, 4 Jul 2023 09:32:40 +0800 Subject: [PATCH 1/2] active user --- 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 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(), }, From 0cb1fc3e528269b3112da5ed5d788ec16722bd2f Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Tue, 4 Jul 2023 09:33:59 +0800 Subject: [PATCH 2/2] active user --- pkg/errs/relation.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/errs/relation.go b/pkg/errs/relation.go index 5d87ab59e..28f161dc4 100644 --- a/pkg/errs/relation.go +++ b/pkg/errs/relation.go @@ -5,7 +5,6 @@ var Relation = &relation{m: make(map[int]map[int]struct{})} func init() { Relation.Add(RecordNotFoundError, UserIDNotFoundError) Relation.Add(RecordNotFoundError, GroupIDNotFoundError) - Relation.Add(DuplicateKeyError, UserIDExisted) Relation.Add(DuplicateKeyError, GroupIDExisted) }