暂存测试代码
This commit is contained in:
parent
e19f8498d3
commit
0d566c0d4b
@ -109,6 +109,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
mapData["bossTime"] = viking.BossTime // 更新时间
|
mapData["bossTime"] = viking.BossTime // 更新时间
|
||||||
this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, req.Report)
|
this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, req.Report)
|
||||||
}
|
}
|
||||||
|
//this.module.CheckSeasonRank(session.GetUserId(), req.BossId, req.Difficulty, 1, nil, 11, true)
|
||||||
|
|
||||||
user := this.module.ModuleUser.GetUser(session.GetUserId())
|
user := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||||
reward = this.module.ModuleTools.GetGroupDataByLottery(vikingCfg.Drop, user.Vip, user.Lv)
|
reward = this.module.ModuleTools.GetGroupDataByLottery(vikingCfg.Drop, user.Vip, user.Lv)
|
||||||
//reward = this.module.configure.GetDropReward(vikingCfg.Drop) // 获取掉落奖励
|
//reward = this.module.configure.GetDropReward(vikingCfg.Drop) // 获取掉落奖励
|
||||||
|
@ -430,6 +430,7 @@ func (this *Viking) CheckSeasonRank(uid string, boosID int32, difficulty int32,
|
|||||||
conn_ *db.DBConn
|
conn_ *db.DBConn
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
bcross = this.CheckCurSeasonData()
|
||||||
if bcross {
|
if bcross {
|
||||||
conn_, err = db.Cross() // 获取跨服数据库对象
|
conn_, err = db.Cross() // 获取跨服数据库对象
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -509,4 +510,28 @@ func (this *Viking) CheckSeasonRank(uid string, boosID int32, difficulty int32,
|
|||||||
this.Errorln(err)
|
this.Errorln(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 以下是测试
|
||||||
|
|
||||||
|
var (
|
||||||
|
szRank []*pb.DBVSeasonRank
|
||||||
|
rd *redis.StringSliceCmd
|
||||||
|
conn *db.DBConn
|
||||||
|
)
|
||||||
|
dbModel := db.NewDBModel(comm.TableVikingRank, 0, conn)
|
||||||
|
|
||||||
|
pipe = conn.Redis.RedisPipe(context.TODO())
|
||||||
|
rd = pipe.ZRevRange("vSeasonRank"+strconv.Itoa(int(1)), 0, comm.MaxRankList)
|
||||||
|
|
||||||
|
if _, err := pipe.Exec(); err != nil {
|
||||||
|
this.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_dataList := rd.Val()
|
||||||
|
for _, v := range _dataList {
|
||||||
|
result := &pb.DBVSeasonRank{}
|
||||||
|
if err := dbModel.Redis.HGetAll(v, result); err == nil {
|
||||||
|
szRank = append(szRank, result)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user