|
|
@ -1162,16 +1162,10 @@ class ExportController extends Controller
|
|
|
|
unset($_REQUEST['pay_game_status']);
|
|
|
|
unset($_REQUEST['pay_game_status']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$marketAdminId = I('market_admin_id', 0);
|
|
|
|
$marketAdminIds = getSearchAdminIds('market_admin_id');
|
|
|
|
if ($marketAdminId) {
|
|
|
|
if (is_array($marketAdminIds)) {
|
|
|
|
$map['market_admin_id'] = $marketAdminId;
|
|
|
|
$map['market_admin_id'] = ['in', $marketAdminIds];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$isMarketAdmin = isMarketAdmin();
|
|
|
|
|
|
|
|
if ($isMarketAdmin) {
|
|
|
|
|
|
|
|
$userAuth = session('user_auth');
|
|
|
|
|
|
|
|
$map['market_admin_id'] = $userAuth['uid'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setPowerPromoteIds($map,'promote_id');
|
|
|
|
setPowerPromoteIds($map,'promote_id');
|
|
|
|
|
|
|
|
|
|
|
@ -1231,6 +1225,7 @@ class ExportController extends Controller
|
|
|
|
'game_id' => '所属CP',
|
|
|
|
'game_id' => '所属CP',
|
|
|
|
'promote_account' => L('Subordinate_channel'),
|
|
|
|
'promote_account' => L('Subordinate_channel'),
|
|
|
|
'0 as company_name' => '所属推广公司',
|
|
|
|
'0 as company_name' => '所属推广公司',
|
|
|
|
|
|
|
|
'1 as admin_department' => '所属市场部',
|
|
|
|
'market_admin_id' => '所属市场专员',
|
|
|
|
'market_admin_id' => '所属市场专员',
|
|
|
|
'merchant_id' => '所属商户',
|
|
|
|
'merchant_id' => '所属商户',
|
|
|
|
'spend_ip' => '充值ip',
|
|
|
|
'spend_ip' => '充值ip',
|
|
|
@ -1305,8 +1300,10 @@ class ExportController extends Controller
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)
|
|
|
|
->order($order ? $order : 'pay_time desc')
|
|
|
|
->order($order ? $order : 'pay_time desc')
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
|
|
|
|
|
$adminIds = array_column($xlsData, 'market_admin_id');
|
|
|
|
|
|
|
|
$adminDepartments = getAdminDepartmentList($adminIds);
|
|
|
|
if ($showMarketAdmin == 1) {
|
|
|
|
if ($showMarketAdmin == 1) {
|
|
|
|
$adminUsernameList = getAdminUsernameList(array_column($xlsData, 'market_admin_id'));
|
|
|
|
$adminUsernameList = getAdminUsernameList($adminIds);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$promoters = D('Promote')->where(['id'=>['in', array_unique(array_column($xlsData, 'promote_id'))]])->field('id, company_id')->select();
|
|
|
|
$promoters = D('Promote')->where(['id'=>['in', array_unique(array_column($xlsData, 'promote_id'))]])->field('id, company_id')->select();
|
|
|
|
$promoters = $promoters ? array_column($promoters, 'company_id', 'id') : [];
|
|
|
|
$promoters = $promoters ? array_column($promoters, 'company_id', 'id') : [];
|
|
|
@ -1341,6 +1338,7 @@ class ExportController extends Controller
|
|
|
|
$value['pay_way'] = get_pay_way($value['pay_way']);
|
|
|
|
$value['pay_way'] = get_pay_way($value['pay_way']);
|
|
|
|
$value['pay_status'] = get_info_status($value['pay_status'],9);
|
|
|
|
$value['pay_status'] = get_info_status($value['pay_status'],9);
|
|
|
|
$value['pay_game_status'] = get_info_status($value['pay_game_status'],14);
|
|
|
|
$value['pay_game_status'] = get_info_status($value['pay_game_status'],14);
|
|
|
|
|
|
|
|
$value['admin_department'] = $adminDepartments[$value['market_admin_id']] ?? '无';
|
|
|
|
if ($showMarketAdmin == 1) {
|
|
|
|
if ($showMarketAdmin == 1) {
|
|
|
|
$value['market_admin_id'] = $adminUsernameList[$value['market_admin_id']] ?? '无';
|
|
|
|
$value['market_admin_id'] = $adminUsernameList[$value['market_admin_id']] ?? '无';
|
|
|
|
}
|
|
|
|
}
|
|
|
|