From c59f02d7c774d2adefdacfb56c1b6bdcc3ebdb3a Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Tue, 30 Jan 2024 16:26:04 +0800 Subject: [PATCH] 1 --- webapp/controller/RankingController.class.php | 2 +- webapp/models/RankBattle.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index 8cb91307..485fe814 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -94,7 +94,7 @@ class RankingController extends BaseAuthedController { 'value' => 0, 'modifytime' => 0, ); - $row = RankBattle::find($type); + $row = RankBattle::find($mode,$class,$type); if ($row){ $myRanked['value'] = $row['value']; $myRanked['modifytime'] = $row['modifytime']; diff --git a/webapp/models/RankBattle.php b/webapp/models/RankBattle.php index 0f1751cd..dd0d683f 100644 --- a/webapp/models/RankBattle.php +++ b/webapp/models/RankBattle.php @@ -110,7 +110,7 @@ class RankBattle extends BaseModel return $rows; } - public static function find($type){ + public static function find($mode,$class,$type){ if (!self::inspectType($type)){ return array(); } @@ -120,6 +120,8 @@ class RankBattle extends BaseModel array( 'account_id' => myself()->_getAccountId(), 'type' => $type, + 'mode' => $mode, + 'class' => $class, ) ); return $row ? $row : null;