From af7dacc7d76dbf48e7b8824d7d2ba224e1bf47be Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 8 Nov 2024 14:45:24 +0800 Subject: [PATCH] 1 --- webapp/models/Circuit.php | 6 ++++-- webapp/services/CircuitRankingService.php | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/webapp/models/Circuit.php b/webapp/models/Circuit.php index eccc56d7..7e420739 100644 --- a/webapp/models/Circuit.php +++ b/webapp/models/Circuit.php @@ -84,7 +84,8 @@ class Circuit extends BaseModel public static function getRankingList($season){ - $sql = "select * from t_circuit_battle where season=:season order by cumulative_score desc,modifytime asc"; + $sql = "select * from t_circuit_battle where season=:season and cumulative_score >= 0" . + "order by cumulative_score desc,modifytime asc"; $whereKv = array( ":season" => $season, ); @@ -115,7 +116,8 @@ class Circuit extends BaseModel } public static function getPhaseRankingList($season,$phase){ - $sql = "select * from t_circuit_battle_phase where season=:season and phase=:phase order by cumulative_score desc,modifytime asc"; + $sql = "select * from t_circuit_battle_phase where season=:season and phase=:phase " . + "and cumulative_score >= 0 order by cumulative_score desc,modifytime asc"; $whereKv = array( ":season" => $season, ":phase" => $phase, diff --git a/webapp/services/CircuitRankingService.php b/webapp/services/CircuitRankingService.php index 244d026e..9368d469 100644 --- a/webapp/services/CircuitRankingService.php +++ b/webapp/services/CircuitRankingService.php @@ -24,4 +24,23 @@ class CircuitRankingService extends BaseService { } } + public static function repairPhaseRanking($currentCircuitMeta) + { + $rows = myself()->_callModelStatic('Circuit', 'getCircuitList', + $currentCircuitMeta['circuit_season']); + if (count($rows) < 100) { + return; + } + } + + public static function repairRanking($currentCircuitMeta) + { + $rows = myself()->_callModelStatic('Circuit', 'getCircuitList', + $currentCircuitMeta['circuit_season']); + if (count($rows) < 100) { + return; + } + } + + }