active user

pull/476/head
withchao 2 years ago
parent 807c6eae15
commit 80f25c54c9

@ -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",
},
},
},

Loading…
Cancel
Save