fix: solve incorrect time.Unix and logger asyncwrite in 3.8.3-patch (#3585)

* Fix: Resolved the issue of incorrect generation of conversationID in 3.8.3-patch branch.

* fix: solve incorrect time.Unix and logger asyncwrite in 3.8.3-patch branch.
This commit is contained in:
Monet Lee
2025-09-30 17:52:24 +08:00
committed by GitHub
parent 746da2554d
commit 0fa714b831
4 changed files with 69 additions and 60 deletions
@@ -137,7 +137,7 @@ func (f *FriendRequestMgo) Take(ctx context.Context, fromUserID, toUserID string
func (f *FriendRequestMgo) GetUnhandledCount(ctx context.Context, userID string, ts int64) (int64, error) {
filter := bson.M{"to_user_id": userID, "handle_result": 0}
if ts != 0 {
filter["create_time"] = bson.M{"$gt": time.Unix(ts, 0)}
filter["create_time"] = bson.M{"$gt": time.UnixMilli(ts)}
}
return mongoutil.Count(ctx, f.coll, filter)
}
@@ -109,7 +109,7 @@ func (g *GroupRequestMgo) GetUnhandledCount(ctx context.Context, groupIDs []stri
}
filter := bson.M{"group_id": bson.M{"$in": groupIDs}, "handle_result": 0}
if ts != 0 {
filter["req_time"] = bson.M{"$gt": time.Unix(ts, 0)}
filter["req_time"] = bson.M{"$gt": time.UnixMilli(ts)}
}
return mongoutil.Count(ctx, g.coll, filter)
}