diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index 5878590d..6f877bc2 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -101,7 +101,7 @@ class RankingController extends BaseAuthedController { ); $rankingList = array(); $meta = mt\RankActivity::get($type); - if ($meta && mt\RankActivity::isActivityPeriod($meta)) { + if ($meta) { $row = myself()->_getSelfMysql()->execQueryOne( 'SELECT COUNT(*) AS row_count FROM t_rank_activity ' . 'WHERE type=:type AND channel=:channel AND value>:value;', @@ -125,6 +125,22 @@ class RankingController extends BaseAuthedController { ) ); $ranked = 1; + foreach ($rows as $row) { + $user = User::find($row['account_id']); + if ($user) { + if ($user['account_id'] == $myRanked['user']['account_id']) { + $myRanked['ranked'] = $ranked; + $myRanked['value'] = $row['value']; + $myRanked['modifytime'] = $row['modifytime']; + } + array_push($rankingList, array( + 'ranked' => $ranked++, + 'user' => User::toSimple($user), + 'value' => $row['value'], + 'modifytime' => $row['modifytime'], + )); + } + } } } { diff --git a/webapp/controller/TempToolsController.class.php b/webapp/controller/TempToolsController.class.php index 832acbf0..7ddc3b76 100644 --- a/webapp/controller/TempToolsController.class.php +++ b/webapp/controller/TempToolsController.class.php @@ -66,6 +66,7 @@ class TempToolsController extends BaseController { )); } +<<<<<<< HEAD public function exportRankActivity() { $type = getReqVal('type', ''); @@ -113,6 +114,8 @@ class TempToolsController extends BaseController { } } +======= +>>>>>>> master public function getRiskAccounts() { $accounts = array(); diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index 629e6f2a..b0a3d934 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -135,7 +135,7 @@ class Gun extends BaseModel { } $todayGetGold = $row['today_get_gold']; $lastGetGoldTime = $row['last_get_gold_time']; - if (myself()->_getDaySeconds($lastGetGoldTime) > myself()->_getNowDaySeconds()) { + if (myself()->_getDaySeconds($lastGetGoldTime) < myself()->_getNowDaySeconds()) { $todayGetGold = 0; } $dto = array( diff --git a/webapp/models/Hero.php b/webapp/models/Hero.php index e81acdd7..4302d2f4 100644 --- a/webapp/models/Hero.php +++ b/webapp/models/Hero.php @@ -123,7 +123,7 @@ class Hero extends BaseModel { } $todayGetGold = $row['today_get_gold']; $lastGetGoldTime = $row['last_get_gold_time']; - if (myself()->_getDaySeconds($lastGetGoldTime) > myself()->_getNowDaySeconds()) { + if (myself()->_getDaySeconds($lastGetGoldTime) < myself()->_getNowDaySeconds()) { $todayGetGold = 0; } $dto = array(