|
|
|
@ -652,10 +652,10 @@ class QueryController extends BaseController
|
|
|
|
|
{
|
|
|
|
|
$this->meta_title = 'ARPU统计';
|
|
|
|
|
|
|
|
|
|
$defaultTime = date('Y-m-d', time() - 7 * 24 * 3600) . ' 至 ' . date('Y-m-d');
|
|
|
|
|
$defaultTime = date('Y-m-d', time() - 7 * 24 * 3600) . ' 至 ' . date('Y-m-d');
|
|
|
|
|
$defaultTime = date('Y-m-d', time() - 6 * 24 * 3600) . ' 至 ' . date('Y-m-d');
|
|
|
|
|
|
|
|
|
|
$time = I('time', $defaultTime);
|
|
|
|
|
$time = I('time', '');
|
|
|
|
|
$time = $time == '' ? $defaultTime : $time;
|
|
|
|
|
$sdkVersion = I('sdk_version', 0);
|
|
|
|
|
$gameId = I('game_id', 0);
|
|
|
|
|
$serverId = I('server_id', 0);
|
|
|
|
@ -672,11 +672,15 @@ class QueryController extends BaseController
|
|
|
|
|
$games = $this->getGamesByPromote($promote);
|
|
|
|
|
|
|
|
|
|
$params = [];
|
|
|
|
|
$searchGameName = '';
|
|
|
|
|
$searchServerName = '';
|
|
|
|
|
if ($gameId > 0) {
|
|
|
|
|
$params['game_id'] = $gameId;
|
|
|
|
|
$searchGameName = M('game', 'tab_')->where(['id' => $gameId])->getField('game_name');
|
|
|
|
|
}
|
|
|
|
|
if ($serverId > 0) {
|
|
|
|
|
$params['server_id'] = $serverId;
|
|
|
|
|
$searchServerName = M('server', 'tab_')->where(['server_id' => $serverId])->getField('server_name');
|
|
|
|
|
}
|
|
|
|
|
if ($sdkVersion > 0) {
|
|
|
|
|
$params['sdk_version'] = $sdkVersion;
|
|
|
|
@ -727,9 +731,19 @@ class QueryController extends BaseController
|
|
|
|
|
$this->assign('subPromotes', $subPromotes);
|
|
|
|
|
$this->assign('timeout', $timeout);
|
|
|
|
|
$this->assign('records', $records);
|
|
|
|
|
$this->assign('searchGameName', $searchGameName);
|
|
|
|
|
$this->assign('searchServerName', $searchServerName);
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function gameArpu()
|
|
|
|
|
{
|
|
|
|
|
$time = I('time');
|
|
|
|
|
$data = M('Apply', 'tab_')->field('game_id, game_name')->where(['promote_id' => $promote_id])->order('game_id desc')->select();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function arpu_analysis()
|
|
|
|
|
{
|
|
|
|
|
$this->meta_title = "ARPU统计";
|
|
|
|
@ -1730,6 +1744,13 @@ class QueryController extends BaseController
|
|
|
|
|
'parent_id' => $promote['id'],
|
|
|
|
|
'grand_id' => $promote['id'],
|
|
|
|
|
];
|
|
|
|
|
if ($headmanPromoteId > 0) {
|
|
|
|
|
$map['parent_id'] = $headmanPromoteId;
|
|
|
|
|
}
|
|
|
|
|
if ($promoteId > 0) {
|
|
|
|
|
$map['id'] = $promoteId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
|
|
|
|
|
|
|
|
|
|
$promotes = [];
|
|
|
|
@ -1751,7 +1772,7 @@ class QueryController extends BaseController
|
|
|
|
|
$map['role_name'] = ['like', '%' . $roleName . '%'];
|
|
|
|
|
}
|
|
|
|
|
if ($userAccount != '') {
|
|
|
|
|
$map['user_acount'] = ['like', '%' . $userAccount . '%'];
|
|
|
|
|
$map['user_account'] = ['like', '%' . $userAccount . '%'];
|
|
|
|
|
}
|
|
|
|
|
if ($sdkVersion != 0) {
|
|
|
|
|
$map['sdk_version'] = $sdkVersion;
|
|
|
|
@ -1778,7 +1799,6 @@ class QueryController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
if ($isSelf) {
|
|
|
|
|
$map['promote_id'] = $promote['id'];
|
|
|
|
|
} else {
|
|
|
|
|
if ($headmanPromoteId != 0) {
|
|
|
|
|
$map['promote_id'] = $headmanPromoteId;
|
|
|
|
|
}
|
|
|
|
@ -1818,6 +1838,12 @@ class QueryController extends BaseController
|
|
|
|
|
'parent_id' => $promote['id'],
|
|
|
|
|
'grand_id' => $promote['id'],
|
|
|
|
|
];
|
|
|
|
|
if ($headmanPromoteId > 0) {
|
|
|
|
|
$map['parent_id'] = $headmanPromoteId;
|
|
|
|
|
}
|
|
|
|
|
if ($promoteId > 0) {
|
|
|
|
|
$map['id'] = $promoteId;
|
|
|
|
|
}
|
|
|
|
|
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
|
|
|
|
|
|
|
|
|
|
$promotes = [];
|
|
|
|
@ -1837,7 +1863,7 @@ class QueryController extends BaseController
|
|
|
|
|
$map['role_name'] = ['like', '%' . $roleName . '%'];
|
|
|
|
|
}
|
|
|
|
|
if ($userAccount != '') {
|
|
|
|
|
$map['user_acount'] = ['like', '%' . $userAccount . '%'];
|
|
|
|
|
$map['user_account'] = ['like', '%' . $userAccount . '%'];
|
|
|
|
|
}
|
|
|
|
|
if ($sdkVersion != 0) {
|
|
|
|
|
$map['sdk_version'] = $sdkVersion;
|
|
|
|
@ -1845,11 +1871,12 @@ class QueryController extends BaseController
|
|
|
|
|
if ($isSelf) {
|
|
|
|
|
$map['promote_id'] = $promote['id'];
|
|
|
|
|
$spendMap['promote_id'] = $promote['id'];
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
if ($headmanPromoteId != 0) {
|
|
|
|
|
$map['promote_id'] = $headmanPromoteId;
|
|
|
|
|
$spendMap['promote_id'] = $headmanPromoteId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($promoteId != 0) {
|
|
|
|
|
$map['promote_id'] = $promoteId;
|
|
|
|
|
$spendMap['promote_id'] = $promoteId;
|
|
|
|
@ -2009,6 +2036,7 @@ class QueryController extends BaseController
|
|
|
|
|
$gameId = I('game_id', 0);
|
|
|
|
|
$serverId = I('server_id', 0);
|
|
|
|
|
$parentId = I('parent_id', 0);
|
|
|
|
|
$promoteId = I('promote_id', 0);
|
|
|
|
|
|
|
|
|
|
$loginPromote = $this->getLoginPromote();
|
|
|
|
|
|
|
|
|
@ -2023,7 +2051,12 @@ class QueryController extends BaseController
|
|
|
|
|
|
|
|
|
|
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']])->select();
|
|
|
|
|
|
|
|
|
|
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']]);
|
|
|
|
|
$map = ['parent_id' => $promote['id']];
|
|
|
|
|
if ($promoteId > 0) {
|
|
|
|
|
$map['id'] = $promoteId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where($map);
|
|
|
|
|
list($promotes, $pagination, $count) = $this->paginate($query);
|
|
|
|
|
$ids = array_column($promotes, 'id');
|
|
|
|
|
|
|
|
|
|