From afc61298beb45778899086ea512f714b9ca949aa Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 26 May 2022 15:12:11 +0800 Subject: [PATCH 1/6] 1 --- webapp/controller/UserController.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 8e199650..ee889baa 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -371,12 +371,17 @@ class UserController extends BaseAuthedController { public function query() { $name = getReqVal('name', ''); + $filter = array( + 'name' => $name, + 'channel' => BC_CHANNEL + ); + if (SERVER_ENV == _ONLINE) { + $filter['channel'] = BC_CHANNEL; + } $userDb = SqlHelper::ormSelectOne ($this->_getMysql($name), 't_user', - array( - 'name' => $name - ) + $filter ); if (!$userDb) { $this->_rspErr(1, 'not found'); From 81cddd6815ea7e2d238329da480bc7e05cccc36c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 26 May 2022 15:14:28 +0800 Subject: [PATCH 2/6] 1 --- webapp/controller/UserController.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index ee889baa..d005bffa 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -373,7 +373,6 @@ class UserController extends BaseAuthedController { $name = getReqVal('name', ''); $filter = array( 'name' => $name, - 'channel' => BC_CHANNEL ); if (SERVER_ENV == _ONLINE) { $filter['channel'] = BC_CHANNEL; From a4471209eab7dd9fc8abe887109a3f4d4a61d9c1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 26 May 2022 18:21:36 +0800 Subject: [PATCH 3/6] 1 --- webapp/controller/RankingController.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index 3c479d3b..54affdcb 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -135,6 +135,21 @@ class RankingController extends BaseAuthedController { } } } + { + $row = myself()->_getSelfMysql()->execQueryOne( + 'SELECT * FROM t_rank_activity ' . + 'WHERE type=:type AND channel=:channel AND account_id=:account_id;', + array( + ':type' => $type, + ':channel' => $channel, + ':account_id' => myself()->_getAccountId(), + ) + ); + if ($row) { + $myRanked['value'] = $row['value']; + $myRanked['modifytime'] = $row['modifytime']; + } + } } $timeZone = 8; $rankingData = array( From 4972f4c95c6c8abf945eb4ad26b0b510c1fd4f1f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 26 May 2022 18:41:01 +0800 Subject: [PATCH 4/6] 1 --- webapp/services/RankActivityService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/services/RankActivityService.php b/webapp/services/RankActivityService.php index 770dfe0f..dfcfe77f 100644 --- a/webapp/services/RankActivityService.php +++ b/webapp/services/RankActivityService.php @@ -42,7 +42,7 @@ class RankActivityService extends BaseService { { $this->internalUpdateRankActivity( self::ALIVE_TYPE, - getReqVal('alive_time', 0), + getReqVal('alive_time', 0) / 1000, self::OP_SUM); $this->internalUpdateRankActivity( self::KILLS_TYPE, From 1b933a69d53807779c4767f6660d2acd200ad584 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 26 May 2022 19:03:31 +0800 Subject: [PATCH 5/6] 1 --- webapp/controller/RankingController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index 54affdcb..bb9633a7 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -105,7 +105,7 @@ class RankingController extends BaseAuthedController { ) ); if ($row['row_count'] > 0) { - $count = ceil($row['row_count'] / 10.0); + $count = ceil($row['row_count'] / 50.0); $rows = myself()->_getSelfMysql()->execQuery( 'SELECT * FROM t_rank_activity ' . 'WHERE type=:type AND channel=:channel AND value>=:value ' . From 2f92acf7312f57221f4ed33ac1f524239c09ac9e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 26 May 2022 19:27:05 +0800 Subject: [PATCH 6/6] 1 --- webapp/controller/RankingController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index bb9633a7..ab2a1e7c 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -105,7 +105,7 @@ class RankingController extends BaseAuthedController { ) ); if ($row['row_count'] > 0) { - $count = ceil($row['row_count'] / 50.0); + $count = ceil($row['row_count'] / 2); $rows = myself()->_getSelfMysql()->execQuery( 'SELECT * FROM t_rank_activity ' . 'WHERE type=:type AND channel=:channel AND value>=:value ' .