From 80f25c54c9ec164bdd08aada57a27c2077dce302 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 3 Jul 2023 21:01:50 +0800 Subject: [PATCH] active user --- pkg/common/db/unrelation/msg.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index e783788e5..6e339a86a 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -372,7 +372,7 @@ func (m *MsgMongoDriver) RangeUserSendCount(ctx context.Context, start time.Time "$sortByCount": "$msgs", }, bson.M{ - "sort": bson.M{ + "$sort": bson.M{ "count": sort, }, }, @@ -385,12 +385,12 @@ func (m *MsgMongoDriver) RangeUserSendCount(ctx context.Context, start time.Time }, }, bson.M{ - "addFields": bson.M{ + "$addFields": bson.M{ "user_count": bson.M{ "$size": "$result", }, "msg_count": bson.M{ - "sum": "$result.count", + "$sum": "$result.count", }, }, },