|
|
|
@ -644,6 +644,7 @@ class QueryController extends BaseController
|
|
|
|
|
$dayList[] = date('Y-m-d', $beginTime);
|
|
|
|
|
$beginTime += 24 * 60 * 60;
|
|
|
|
|
} while ($beginTime < $endTime);
|
|
|
|
|
|
|
|
|
|
return $dayList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -651,6 +652,7 @@ 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');
|
|
|
|
|
|
|
|
|
|
$time = I('time', $defaultTime);
|
|
|
|
@ -1055,11 +1057,12 @@ class QueryController extends BaseController
|
|
|
|
|
->where($map)
|
|
|
|
|
->order('play_time desc')
|
|
|
|
|
->count();//创角数
|
|
|
|
|
$list['user_num'] = $userPlayInfoModel
|
|
|
|
|
$list['user_num'] = count($userPlayInfoModel
|
|
|
|
|
->join($join)
|
|
|
|
|
->where($userPlayInfoWhere)
|
|
|
|
|
->where($map)
|
|
|
|
|
->count('distinct tab_user_play_info.user_id');//创角用户
|
|
|
|
|
->group('tab_user_play_info.game_id,tab_user_play_info.user_id')
|
|
|
|
|
->select());//创角用户
|
|
|
|
|
|
|
|
|
|
$newUserNumData = $userPlayInfoModel
|
|
|
|
|
->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.user_id) as num')
|
|
|
|
@ -1085,17 +1088,19 @@ class QueryController extends BaseController
|
|
|
|
|
->find();
|
|
|
|
|
$list['new_ip_num'] = empty($newIpNumData['num']) ? 0 : $newIpNumData['num'];//新增创角IP
|
|
|
|
|
|
|
|
|
|
$list['login_user_num'] = M('UserGameLoginRecord', 'tab_')
|
|
|
|
|
$list['login_user_num'] = count(M('UserGameLoginRecord', 'tab_')
|
|
|
|
|
->join($join)
|
|
|
|
|
->where($userGameLoginWhere)
|
|
|
|
|
->where($map)
|
|
|
|
|
->count('distinct tab_user_game_login_record.user_id');//登录用户数
|
|
|
|
|
$list['spend_user_num'] = M('Spend', 'tab_')
|
|
|
|
|
->field('tab_spend.id')
|
|
|
|
|
->group('tab_user_game_login_record.game_id,tab_user_game_login_record.user_id')
|
|
|
|
|
->select());//登录用户数
|
|
|
|
|
|
|
|
|
|
$list['spend_user_num'] = count(M('Spend', 'tab_')
|
|
|
|
|
->join($join)
|
|
|
|
|
->where($spendWhere)
|
|
|
|
|
->where($map)
|
|
|
|
|
->count('distinct tab_spend.user_id');//充值人数
|
|
|
|
|
->group('tab_spend.game_id,tab_spend.user_id')
|
|
|
|
|
->select());//充值人数
|
|
|
|
|
$list['spend_num'] = M('Spend', 'tab_')
|
|
|
|
|
->join($join)
|
|
|
|
|
->where($spendWhere)
|
|
|
|
@ -1274,6 +1279,7 @@ class QueryController extends BaseController
|
|
|
|
|
$userGameLoginMap['tab_user_game_login_record.login_time'] = ['between', [$begTime, $endTime + 86399]];
|
|
|
|
|
|
|
|
|
|
$spendMap['tab_spend.pay_time'] = ['between', [$begTime, $endTime + 86399]];
|
|
|
|
|
$spendMap['tab_spend.pay_status'] = 1;
|
|
|
|
|
$spendMap2 = $spendMap;
|
|
|
|
|
// $spendWhere['_string'] = 'tab_spend.game_id = tab_apply.game_id';
|
|
|
|
|
// $spendMap['_complex'] = $spendWhere;
|
|
|
|
@ -1319,7 +1325,13 @@ class QueryController extends BaseController
|
|
|
|
|
$parameter['begtime'] = $initBegTime;
|
|
|
|
|
$parameter['endtime'] = $initEndTime;
|
|
|
|
|
|
|
|
|
|
$allData = [];
|
|
|
|
|
$allData['spend_num'] = 0;
|
|
|
|
|
$allData['spend_all_amount'] = 0;
|
|
|
|
|
$allData['spend_cash'] = 0;
|
|
|
|
|
$allData['spend_generic'] = 0;
|
|
|
|
|
$allData['pay_amount'] = 0;
|
|
|
|
|
$allData['spend_discount'] = 0;
|
|
|
|
|
$allData['spend_voucher'] = 0;
|
|
|
|
|
if (!empty($data)) {
|
|
|
|
|
foreach ($data as &$list) {
|
|
|
|
|
$userPlayInfoMap['tab_user_play_info.game_id'] = $list['game_id'];
|
|
|
|
@ -1389,36 +1401,18 @@ class QueryController extends BaseController
|
|
|
|
|
->where($spendMap)
|
|
|
|
|
->where(array('tab_spend.pay_way' => -1))
|
|
|
|
|
->sum('tab_spend.pay_amount');//绑定币
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$allData['spend_num'] = M('Spend', 'tab_')
|
|
|
|
|
->where($spendMap2)
|
|
|
|
|
->count();//充值次数
|
|
|
|
|
$allData['spend_all_amount'] = M('Spend', 'tab_')
|
|
|
|
|
->where($spendMap2)
|
|
|
|
|
->sum('tab_spend.pay_amount');//充值总额
|
|
|
|
|
$allData['spend_all_amount'] = empty($allData['spend_all_amount']) ? 0 : $allData['spend_all_amount'];
|
|
|
|
|
|
|
|
|
|
$allData['spend_cash'] = M('Spend', 'tab_')
|
|
|
|
|
->where($spendMap2)
|
|
|
|
|
->where(array('tab_spend.pay_way' => ['in', '1,2,3,4,5,6']))
|
|
|
|
|
->sum('tab_spend.pay_amount');//现金充值
|
|
|
|
|
$allData['spend_cash'] = empty($allData['spend_cash']) ? 0 : $allData['spend_cash'];
|
|
|
|
|
|
|
|
|
|
$allData['spend_generic'] = M('Spend', 'tab_')
|
|
|
|
|
->where($spendMap2)
|
|
|
|
|
->where(array('tab_spend.pay_way' => 0))
|
|
|
|
|
->sum('tab_spend.pay_amount');//通用币
|
|
|
|
|
$allData['spend_generic'] = empty($allData['spend_generic']) ? 0 : $allData['spend_generic'];
|
|
|
|
|
|
|
|
|
|
$allData['spend_binding'] = M('Spend', 'tab_')
|
|
|
|
|
->where($spendMap2)
|
|
|
|
|
->where(array('tab_spend.pay_way' => -1))
|
|
|
|
|
->sum('tab_spend.pay_amount');//绑定币
|
|
|
|
|
$allData['spend_binding'] = empty($allData['spend_binding']) ? 0 : $allData['spend_binding'];
|
|
|
|
|
$list['spend_discount'] = 0;//折扣币
|
|
|
|
|
$list['spend_voucher'] = 0;//代金券
|
|
|
|
|
|
|
|
|
|
$allData['spend_discount'] = 0;//折扣币
|
|
|
|
|
$allData['spend_voucher'] = 0;//代金券
|
|
|
|
|
$allData['spend_num'] += $list['spend_num'];
|
|
|
|
|
$allData['spend_all_amount'] += $list['spend_all_amount'];
|
|
|
|
|
$allData['spend_cash'] += $list['spend_cash'];
|
|
|
|
|
$allData['spend_generic'] += $list['spend_generic'];
|
|
|
|
|
$allData['spend_binding'] += $list['spend_binding'];
|
|
|
|
|
$allData['spend_discount'] += $list['spend_discount'];
|
|
|
|
|
$allData['spend_voucher'] += $list['spend_voucher'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$serverData = $this->getServer(I('relation_game_id'), I('sdk_version'));
|
|
|
|
@ -2054,7 +2048,6 @@ class QueryController extends BaseController
|
|
|
|
|
$params['begin_time'] = $beginTime;
|
|
|
|
|
$params['end_time'] = $endTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$promoteRepository = new PromoteRepository();
|
|
|
|
|
$createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params);
|
|
|
|
|
$createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params);
|
|
|
|
|