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