|
|
|
@ -3016,22 +3016,22 @@ class DownloadController extends BaseController {
|
|
|
|
|
public function achievementExcelInfo($tid,$map) {
|
|
|
|
|
$xlsName = "推广员业绩";
|
|
|
|
|
$xlsCell = array(
|
|
|
|
|
array('account','账号'),
|
|
|
|
|
array('real_name','姓名'),
|
|
|
|
|
array('create_role_count','创角数'),
|
|
|
|
|
array('create_role_user_count','创角用户'),
|
|
|
|
|
array('new_create_role_user_count','新创角用户'),
|
|
|
|
|
array('new_create_role_ip_count','新创角ip'),
|
|
|
|
|
array('login_user_count','登陆用户数'),
|
|
|
|
|
array('recharge_user_count','充值人数'),
|
|
|
|
|
array('recharge_count','充值次数'),
|
|
|
|
|
array('recharge_amount','充值总额'),
|
|
|
|
|
array('recharge_by_ban_coin','绑定币充值'),
|
|
|
|
|
array('recharge_by_coin','通用币充值'),
|
|
|
|
|
array('recharge_by_cash','现金充值'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
array('account','账号'),
|
|
|
|
|
array('real_name','姓名'),
|
|
|
|
|
array('create_role_count','创角数'),
|
|
|
|
|
array('create_role_user_count','创角用户'),
|
|
|
|
|
array('new_create_role_user_count','新创角用户'),
|
|
|
|
|
array('new_create_role_ip_count','新创角ip'),
|
|
|
|
|
array('login_user_count','登陆用户数'),
|
|
|
|
|
);
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$xlsCell[] = array('recharge_user_count','充值人数');
|
|
|
|
|
$xlsCell[] = array('recharge_count','充值次数');
|
|
|
|
|
$xlsCell[] = array('recharge_amount','充值总额');
|
|
|
|
|
$xlsCell[] = array('recharge_by_ban_coin','绑定币充值');
|
|
|
|
|
$xlsCell[] = array('recharge_by_coin','通用币充值');
|
|
|
|
|
$xlsCell[] = array('recharge_by_cash','现金充值');
|
|
|
|
|
}
|
|
|
|
|
$params['isContainSubs'] = $map['isContainSubs'];
|
|
|
|
|
$params['basicPromotes'] = json_decode($map['basicPromotes'],TRUE);
|
|
|
|
|
$ids = $map['ids'];
|
|
|
|
@ -3067,9 +3067,16 @@ class DownloadController extends BaseController {
|
|
|
|
|
$newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
|
|
|
|
|
$newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
|
|
|
|
|
$loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
|
|
|
|
|
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
|
|
|
|
|
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
|
|
|
|
|
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
|
|
|
|
|
|
|
|
|
|
$rechargeCountList = [];
|
|
|
|
|
$rechargeUserCountList = [];
|
|
|
|
|
$rechargeAmountList = [];
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
|
|
|
|
|
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
|
|
|
|
|
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$records = [];
|
|
|
|
|
if (I('p', 1) == 1) {
|
|
|
|
|
$selfParams = $params;
|
|
|
|
@ -3079,12 +3086,8 @@ class DownloadController extends BaseController {
|
|
|
|
|
$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[] = [
|
|
|
|
|
$record = [
|
|
|
|
|
'id' => $parent['id'],
|
|
|
|
|
'account' => $parent['account'],
|
|
|
|
|
'real_name' => $parent['real_name'],
|
|
|
|
@ -3095,18 +3098,24 @@ class DownloadController extends BaseController {
|
|
|
|
|
// '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,
|
|
|
|
|
];
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams);
|
|
|
|
|
$record['recharge_count'] = $selfRechargeCountList[$parent['id']];
|
|
|
|
|
$record['recharge_user_count'] = $selfRechargeUserCountList[$parent['id']];
|
|
|
|
|
$record['recharge_amount'] = $selfRechargeAmountList[$parent['id']]['ban_coin'] + $selfRechargeAmountList[$parent['id']]['coin'] + $selfRechargeAmountList[$parent['id']]['cash'];
|
|
|
|
|
$record['recharge_by_ban_coin'] = $selfRechargeAmountList[$parent['id']]['ban_coin'];
|
|
|
|
|
$record['recharge_by_coin'] = $selfRechargeAmountList[$parent['id']]['coin'];
|
|
|
|
|
$record['recharge_by_cash'] = $selfRechargeAmountList[$parent['id']]['cash'];
|
|
|
|
|
}
|
|
|
|
|
$records[] = $record;
|
|
|
|
|
}
|
|
|
|
|
foreach ($promotes as $promote) {
|
|
|
|
|
$id = $promote['id'];
|
|
|
|
|
$records[] = [
|
|
|
|
|
$record = [
|
|
|
|
|
'id' => $id,
|
|
|
|
|
'account' => $promote['account'],
|
|
|
|
|
'real_name' => $promote['real_name'],
|
|
|
|
@ -3117,14 +3126,17 @@ class DownloadController extends BaseController {
|
|
|
|
|
'new_create_role_device_count' => $newCreateRoleDeviceCountList[$id],
|
|
|
|
|
'new_create_role_ip_count' => $newCreateRoleIpCountList[$id],
|
|
|
|
|
'login_user_count' => $loginUserCountList[$id],
|
|
|
|
|
'recharge_count' => $rechargeCountList[$id],
|
|
|
|
|
'recharge_user_count' => $rechargeUserCountList[$id],
|
|
|
|
|
'recharge_amount' => $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'],
|
|
|
|
|
'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
|
|
|
|
|
'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
|
|
|
|
|
'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
|
|
|
|
|
'current_display' => '',
|
|
|
|
|
];
|
|
|
|
|
if ($this->canViewUserRecharge) {
|
|
|
|
|
$record['recharge_count'] = $rechargeCountList[$id];
|
|
|
|
|
$record['recharge_user_count'] = $rechargeUserCountList[$id];
|
|
|
|
|
$record['recharge_amount'] = $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'];
|
|
|
|
|
$record['recharge_by_ban_coin'] = $rechargeAmountList[$id]['ban_coin'];
|
|
|
|
|
$record['recharge_by_coin'] = $rechargeAmountList[$id]['coin'];
|
|
|
|
|
$record['recharge_by_cash'] = $rechargeAmountList[$id]['cash'];
|
|
|
|
|
}
|
|
|
|
|
$records[] = $record;
|
|
|
|
|
}
|
|
|
|
|
$xlsData = [];
|
|
|
|
|
foreach ($records as $key1 => $value1) {
|
|
|
|
|