|
|
|
@ -64,7 +64,7 @@ class PromoteGameRatioController extends ThinkController
|
|
|
|
|
$promoteIds = array_column($promoteGameRatios, 'promote_id');
|
|
|
|
|
$gameIds = array_column($promoteGameRatios, 'game_id');
|
|
|
|
|
$promoteFiled = 'id, account, mobile_phone, create_time, status, ver_status';
|
|
|
|
|
$gameFiled = 'id, game_name, ratio';
|
|
|
|
|
$gameFiled = 'id, relation_game_name, ratio';
|
|
|
|
|
$promotes = M('promote', 'tab_')->where(array('id' => ['in', $promoteIds]))->getField($promoteFiled, true);
|
|
|
|
|
$games = M('game', 'tab_')->where(array('id' => ['in', $gameIds]))->getField($gameFiled, true);
|
|
|
|
|
|
|
|
|
@ -103,7 +103,7 @@ class PromoteGameRatioController extends ThinkController
|
|
|
|
|
$thisPromoteVerStatus = getPromoteVerStatus($promotes[$thisPromoteId]['ver_status'], 2);
|
|
|
|
|
}
|
|
|
|
|
if ($issetGame) {
|
|
|
|
|
$thisGameName = $games[$thisGameId]['game_name'];
|
|
|
|
|
$thisGameName = $games[$thisGameId]['relation_game_name'];
|
|
|
|
|
$thisGameRatio = $games[$thisGameId]['ratio'];
|
|
|
|
|
$thisGameRatio = ($thisGameRatio ?? '0.00') . '%';
|
|
|
|
|
}
|
|
|
|
@ -161,7 +161,7 @@ class PromoteGameRatioController extends ThinkController
|
|
|
|
|
$this->assign('group', $group);
|
|
|
|
|
$this->assign('records', $records);
|
|
|
|
|
$this->assign('count', $count);
|
|
|
|
|
$this->assign('gameList', getAllGameList());
|
|
|
|
|
$this->assign('gameList', getAllGameList(true));
|
|
|
|
|
$this->assign('promoteList', getPromoteByLevel(1));
|
|
|
|
|
$this->assign('statusList', self::$statusList);
|
|
|
|
|
$this->assign('reviewRule', $reviewRule);
|
|
|
|
@ -389,8 +389,11 @@ class PromoteGameRatioController extends ThinkController
|
|
|
|
|
$promoteIds = M('promote', 'tab_')->where($promoteMap)->getField('id', true);
|
|
|
|
|
$promoteIds[] = $promoteId;
|
|
|
|
|
|
|
|
|
|
$gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true);
|
|
|
|
|
$gameIds = $gameIds ?? [-1];
|
|
|
|
|
|
|
|
|
|
$spendMap['promote_id'] = ['in', $promoteIds];
|
|
|
|
|
$spendMap['game_id'] = $promoteGameRatio['game_id'];
|
|
|
|
|
$spendMap['game_id'] = ['in', $gameIds];
|
|
|
|
|
if ($promoteGameRatio['end_time'] > 0) {
|
|
|
|
|
$spendMap['pay_time'] = ['between', [$promoteGameRatio['begin_time'], $promoteGameRatio['end_time'] + 3600 * 24 - 1]];
|
|
|
|
|
} else {
|
|
|
|
|