结算管理--更新

master
chenxiaojun 5 years ago
parent 70ade1c071
commit 28897755c9

@ -724,7 +724,7 @@ function getAllGameList($groupByRelation = false)
{
$field = 'id, game_name, relation_game_id, relation_game_name';
if ($groupByRelation) {
$games = M('game', 'tab_')->field($field)->group('relation_game_id')->select();
$games = M('game', 'tab_')->field($field)->where('id = relation_game_id')->group('relation_game_id')->select();
} else {
$games = M('game', 'tab_')->field($field)->select();
}

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

Loading…
Cancel
Save