推广平台>数据管理>充值玩家--更新

master
chenxiaojun 5 years ago
parent 0679e5709b
commit f032257838

@ -6,11 +6,30 @@ use Think\Controller;
class PromoteGameRatioController extends ThinkController class PromoteGameRatioController extends ThinkController
{ {
const MODEL_NAME = 'promote_game_ratio';
public function lists() public function lists()
{ {
$params = I('get.'); $params = I('get.');
$promoteAccount = $params['promote_account'] ?? ''; $promoteAccount = $params['promote_account'] ?? '';
$gameId = $params['game_id'] ?? 0; $gameId = $params['game_id'] ?? 0;
$status = $params['status'] ?? ''; $status = $params['status'] ?? '';
$map['_string'] = '1 = 1';
if ($promoteAccount) {
$promoteMap['account'] = $promoteAccount;
$promoteId = M('promote', 'tab_')->where($promoteMap)->getField('id');
$promoteId = $promoteId ?? 0;
$map['promote_id'] = $promoteId;
}
if ($gameId) {
$map['game_id'] = $gameId;
}
if ($status !== '') {
$map['status'] = $status;
}
$field = 'create_time, update_time';
$query = D(self::MODEL_NAME)->getLists();
} }
} }

@ -2,7 +2,7 @@
namespace Admin\Model; namespace Admin\Model;
class PromoteGameRatioModel class PromoteGameRatioModel extends CommentModel
{ {
} }

@ -1197,4 +1197,19 @@ function promoteCan($promoteId, \Closure $callback)
function getChildGameAddPermission($promoteId) function getChildGameAddPermission($promoteId)
{ {
return D('Promote')->where(array('id' => $promoteId))->getField('child_game_permission'); return D('Promote')->where(array('id' => $promoteId))->getField('child_game_permission');
}
function gameSearch($relationGameId, $sdkVersion)
{
$map['_string'] = '1 = 1';
if ($relationGameId != 0) {
$map['relation_game_id'] = $relationGameId;
}
if ($sdkVersion != 0) {
$map['sdk_version'] = $sdkVersion;
}
$gameIds = M('game', 'tab_')->where($map)->getField('id', true);
$gameIds = $gameIds ?? [-1];
return $gameIds;
} }
Loading…
Cancel
Save