This commit is contained in:
aozhiwei 2022-06-02 17:28:08 +08:00
commit 9c3a61daa4
4 changed files with 22 additions and 3 deletions

View File

@ -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'],
));
}
}
}
}
{

View File

@ -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();

View File

@ -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(

View File

@ -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(