This commit is contained in:
parent
bb99581c27
commit
93cbd49ab0
@ -9,6 +9,7 @@ import (
|
||||
"gitea.youtukeji.com.cn/xiabin/youtu_server/gorm-gen/dao/model"
|
||||
"github.com/redis/go-redis/v9"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
@ -72,7 +73,7 @@ func (l *RankingSetScoreLogic) RankingSetScore(req *types.SetUserGameScoreReques
|
||||
// 更新排行榜
|
||||
l.svcCtx.RedisRanking.SetList(l.ctx, rankings.GetRankingsCacheKey(at.AppId, req.Type), redis.Z{
|
||||
Member: at.UserId,
|
||||
Score: float64(uint64(req.Score)<<32 + uint64(oldScore.UpdatedAt.Unix())),
|
||||
Score: float64(uint64(req.Score)<<32 + uint64(time.Now().Unix())),
|
||||
})
|
||||
|
||||
l.Logger.Debugf("GameScore: %+v", oldScore)
|
||||
|
Loading…
x
Reference in New Issue
Block a user