fix
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
xiabin 2025-01-26 20:10:41 +08:00
parent bb99581c27
commit 93cbd49ab0

View File

@ -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)