From f8b7a902a07a9ea9b95b92b5db2d5b62d222a18e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sun, 22 May 2022 11:01:21 +0800 Subject: [PATCH] 1 --- webapp/controller/RankingController.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index e70af74b..3c479d3b 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -84,6 +84,7 @@ class RankingController extends BaseAuthedController { private function internalGetActivityRankData($type) { + $channel = 6516; $userInfo = $this->_getOrmUserInfo(); $myRanked = array( 'ranked' => -1, @@ -96,21 +97,23 @@ class RankingController extends BaseAuthedController { if ($meta && mt\RankActivity::isActivityPeriod($meta)) { $row = myself()->_getSelfMysql()->execQueryOne( 'SELECT COUNT(*) AS row_count FROM t_rank_activity ' . - 'WHERE type=:type AND value>:value;', + 'WHERE type=:type AND channel=:channel AND value>:value;', array( ':type' => $type, - ':value' => $meta['cond'] + ':channel' => $channel, + ':value' => $meta['cond'], ) ); if ($row['row_count'] > 0) { $count = ceil($row['row_count'] / 10.0); $rows = myself()->_getSelfMysql()->execQuery( 'SELECT * FROM t_rank_activity ' . - 'WHERE type=:type AND value>=:value ' . + 'WHERE type=:type AND channel=:channel AND value>=:value ' . 'ORDER BY value DESC, modifytime ASC ' . "LIMIT ${count}", array( ':type' => $type, + ':channel' => $channel, ':value' => $meta['cond'] ) );