diff --git a/server/gameservice/constant/constant.go b/server/gameservice/constant/constant.go index c845d74b..9dfc0a05 100644 --- a/server/gameservice/constant/constant.go +++ b/server/gameservice/constant/constant.go @@ -21,3 +21,5 @@ const ( EMAIL_URL_DEV = "gamemail-test.kingsome.cn" EMAIL_KEY = "520d8eeb8cf1d833a42c820432c020b2fd60f4b7|" + EMAIL_URL_DEV ) + +const BASE_SCORE = 4000 diff --git a/server/gameservice/task/seasonRanking.go b/server/gameservice/task/seasonRanking.go index 78c07c4b..1f5d5403 100644 --- a/server/gameservice/task/seasonRanking.go +++ b/server/gameservice/task/seasonRanking.go @@ -45,10 +45,6 @@ func (this *SeasonRankMgr) UnInit() { } -// var lastIdx int64 = 0 -var done bool = false -var baseScore int32 = 4000 - func (this *SeasonRankMgr) CalcRanking() { lastIdx := int64(0) this.getUsersRecords(lastIdx, 100) @@ -60,7 +56,7 @@ func (this *SeasonRankMgr) CalcRanking() { func (this *SeasonRankMgr) getUsersRecords(lastIdx int64, limit int64) { sql := fmt.Sprintf("SELECT idx,account_id,channel,`rank`,score,score_modifytime,`address` FROM t_user WHERE score > %d and idx > %d limit %d", - baseScore, lastIdx, limit) + constant.BASE_SCORE, lastIdx, limit) f5.GetJsStyleDb().SelectCustomQuery( constant.GAME_DB, sql, @@ -84,7 +80,7 @@ func (this *SeasonRankMgr) getUsersRecords(lastIdx int64, limit int64) { lastIdx = q5.ToInt64(*rows.GetByName("idx")) } if empty { - done = true + //done = true } fmt.Println(this.userData) },