|
|
|
@ -1420,6 +1420,8 @@ class DownloadController extends BaseController {
|
|
|
|
|
'basicPromotes' => json_encode($basicPromotes,FALSE),
|
|
|
|
|
];
|
|
|
|
|
$map['promotes'] = json_encode($data,FALSE);
|
|
|
|
|
$map['parentsinfo'] = json_encode($parent,FALSE);;
|
|
|
|
|
$map['currentDisplay'] = $currentDisplay;
|
|
|
|
|
$map['ids'] = $ids;
|
|
|
|
|
if ($gameId > 0) {
|
|
|
|
|
$params['game_id'] = $gameId;
|
|
|
|
@ -1812,7 +1814,7 @@ class DownloadController extends BaseController {
|
|
|
|
|
array('create_time','创建时间'),
|
|
|
|
|
);
|
|
|
|
|
$model = M('user_play_info','tab_');
|
|
|
|
|
$data = $model->field('user_account,promote_account,game_name,server_name,role_name,role_level')->where($map)->order('create_time desc')->select();
|
|
|
|
|
$data = $model->field('user_account,promote_account,game_name,server_name,role_name,role_level,create_time')->where($map)->order('create_time desc')->select();
|
|
|
|
|
$xlsData = [];
|
|
|
|
|
foreach ($data as $key1 => $value1) {
|
|
|
|
|
$value1['user_account'] = $this->encryption($value1['user_account']);
|
|
|
|
@ -1873,7 +1875,7 @@ class DownloadController extends BaseController {
|
|
|
|
|
->join($serverJoin)//关联区服表
|
|
|
|
|
->where($map)
|
|
|
|
|
->group('tab_apply.game_id')
|
|
|
|
|
->order('g.sort desc,tab_apply.id desc')
|
|
|
|
|
->order('g.sort desc,g.id desc')
|
|
|
|
|
->select();
|
|
|
|
|
$records = [];
|
|
|
|
|
if (!empty($data)) {
|
|
|
|
@ -2666,15 +2668,14 @@ class DownloadController extends BaseController {
|
|
|
|
|
array('create_role_count','创角数'),
|
|
|
|
|
array('create_role_user_count','创角用户'),
|
|
|
|
|
array('new_create_role_user_count','新创角用户'),
|
|
|
|
|
array('new_create_role_device_count','新创角设备'),
|
|
|
|
|
array('new_create_role_ip_count','新创角ip'),
|
|
|
|
|
array('login_user_count','登陆用户数'),
|
|
|
|
|
array('recharge_count','充值人数'),
|
|
|
|
|
array('recharge_user_count','充值次数'),
|
|
|
|
|
array('recharge_user_count','充值人数'),
|
|
|
|
|
array('recharge_count','充值次数'),
|
|
|
|
|
array('recharge_amount','充值总额'),
|
|
|
|
|
array('recharge_by_ban_coin','现金充值'),
|
|
|
|
|
array('recharge_by_ban_coin','绑定币充值'),
|
|
|
|
|
array('recharge_by_coin','通用币充值'),
|
|
|
|
|
array('recharge_by_cash','绑定币充值'),
|
|
|
|
|
array('recharge_by_cash','现金充值'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
@ -2694,6 +2695,15 @@ class DownloadController extends BaseController {
|
|
|
|
|
if(!empty($map['lock_status'])) {
|
|
|
|
|
$params['lock_status'] = $map["lock_status"];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!empty($map['parentsinfo'])) {
|
|
|
|
|
$parent = json_decode($map['parentsinfo'],TRUE);
|
|
|
|
|
unset($map['parentsinfo']);
|
|
|
|
|
}
|
|
|
|
|
if(!empty($map['currentDisplay'])) {
|
|
|
|
|
$currentDisplay = $map['currentDisplay'];
|
|
|
|
|
unset($map['currentDisplay']);
|
|
|
|
|
}
|
|
|
|
|
$params['begin_time'] = $map['begin_time'];
|
|
|
|
|
$params['end_time'] = $map['end_time'];
|
|
|
|
|
|
|
|
|
@ -2708,6 +2718,39 @@ class DownloadController extends BaseController {
|
|
|
|
|
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
|
|
|
|
|
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
|
|
|
|
|
$records = [];
|
|
|
|
|
if (I('p', 1) == 1) {
|
|
|
|
|
$selfParams = $params;
|
|
|
|
|
$selfParams['isContainSubs'] = false;
|
|
|
|
|
$selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
// $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
|
|
|
|
|
$selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$records[] = [
|
|
|
|
|
'id' => $parent['id'],
|
|
|
|
|
'account' => $parent['account'],
|
|
|
|
|
'real_name' => $parent['real_name'],
|
|
|
|
|
'level' => $parent['level'],
|
|
|
|
|
'create_role_count' => $selfCreateRoleCountList[$parent['id']],
|
|
|
|
|
'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']],
|
|
|
|
|
'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$parent['id']],
|
|
|
|
|
// 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$parent['id']],
|
|
|
|
|
'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$parent['id']],
|
|
|
|
|
'login_user_count' => $selfLoginUserCountList[$parent['id']],
|
|
|
|
|
'recharge_count' => $selfRechargeCountList[$parent['id']],
|
|
|
|
|
'recharge_user_count' => $selfRechargeUserCountList[$parent['id']],
|
|
|
|
|
'recharge_amount' => $selfRechargeAmountList[$parent['id']]['ban_coin'] + $selfRechargeAmountList[$parent['id']]['coin'] + $selfRechargeAmountList[$parent['id']]['cash'],
|
|
|
|
|
'recharge_by_ban_coin' => $selfRechargeAmountList[$parent['id']]['ban_coin'],
|
|
|
|
|
'recharge_by_coin' => $selfRechargeAmountList[$parent['id']]['coin'],
|
|
|
|
|
'recharge_by_cash' => $selfRechargeAmountList[$parent['id']]['cash'],
|
|
|
|
|
'current_display' => $currentDisplay,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
foreach ($promotes as $promote) {
|
|
|
|
|
$id = $promote['id'];
|
|
|
|
|
$records[] = [
|
|
|
|
@ -2770,7 +2813,9 @@ class DownloadController extends BaseController {
|
|
|
|
|
$subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]];
|
|
|
|
|
$roleIdMap = $subMap;
|
|
|
|
|
$roleIds = M('user_play_data_count', 'tab_')->where($roleIdMap)->group('role_id')->getField('role_id', true);
|
|
|
|
|
if (count($roleIds) > 0) {
|
|
|
|
|
$map['role_id'] = ['in', $roleIds];
|
|
|
|
|
}
|
|
|
|
|
if ($costBegin != '' || $costEnd != '') {
|
|
|
|
|
$having = '';
|
|
|
|
|
if ($costBegin != '' && $costEnd != '') {
|
|
|
|
|