From 46b7b7b85a93c33460fad551f858460f8291e023 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 29 Aug 2019 20:23:20 +0800 Subject: [PATCH] 1 --- tools/rankserver/app.py | 2 +- webapp/controller/RankController.class.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/rankserver/app.py b/tools/rankserver/app.py index 3beaf46..417e166 100644 --- a/tools/rankserver/app.py +++ b/tools/rankserver/app.py @@ -223,7 +223,7 @@ if __name__ == "__main__": app = make_app() app.listen(conf['listen_port']) - conf['rushtime'] = 300 + conf['rushtime'] = 5 tornado.ioloop.IOLoop.current().call_later(conf['rushtime'], lambda : readMysqlData(conf['rushtime']) ) diff --git a/webapp/controller/RankController.class.php b/webapp/controller/RankController.class.php index d13ac13..2fb6cb5 100644 --- a/webapp/controller/RankController.class.php +++ b/webapp/controller/RankController.class.php @@ -76,7 +76,6 @@ class RankController{ if ($row['integral'] >= $seaPoint['min'] && $row['integral'] <= $seaPoint['max'] || $seaPoint['max'] == -1) { $rank = $ii; - $score = $row['integral'] - $seaPoint['min']; break; } } @@ -89,7 +88,7 @@ class RankController{ 'harm' => phpcommon\safediv($row['harm'], $row['game_times']), 'win_rate' => phpcommon\safediv($row['win_times'], $row['game_times']), 'win_game' => $row['win_times'], - 'score' => $score, + 'score' => $row['integral'], 'level' => $rank, )); } @@ -161,7 +160,6 @@ class RankController{ || $integral_db[$i][8] >= $seaPoint['min'] && $seaPoint['max'] == -1) { $rank = $ii; - $score = $integral_db[$i][8] - $seaPoint['min']; break; } } @@ -177,7 +175,7 @@ class RankController{ 'harm' => $integral_db[$i][5], 'win_rate' => $integral_db[$i][6], 'win_game' => $integral_db[$i][7], - 'score' => $score, + 'score' => $integral_db[$i][8], 'level' => $rank, )); $i++;