Commit 4fd91f6e authored by iamhujiebin's avatar iamhujiebin

fix: recent

parent 1845196b
...@@ -54,10 +54,10 @@ func GetUserRecentRooms(model *domain.Model, userId uint64, offset, limit int64) ...@@ -54,10 +54,10 @@ func GetUserRecentRooms(model *domain.Model, userId uint64, offset, limit int64)
roomEnterTime = make(map[string]int64) roomEnterTime = make(map[string]int64)
userKey := group_k.GetUserEnterRoomUserKey(userId) userKey := group_k.GetUserEnterRoomUserKey(userId)
res, err := model.Redis.ZRangeByScoreWithScores(model, userKey, &redis.ZRangeBy{ res, err := model.Redis.ZRangeByScoreWithScores(model, userKey, &redis.ZRangeBy{
Min: fmt.Sprintf("%d", time.Now().AddDate(0, -3, 0).Unix()), Min: fmt.Sprintf("%d", time.Now().AddDate(0, -3, 0).Unix()),
Max: "+inf", Max: "+inf",
Offset: offset, //Offset: offset,
Count: limit, //Count: limit,
}).Result() }).Result()
if err != nil { if err != nil {
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment