@ -1081,11 +1081,14 @@ class ExportController extends Controller
array('set_pay_time', '更新时间', 'time_format', '*'),
);
break;
case 71:
case 7:
$startDate = empty($_REQUEST['timestart']) ? date('Y-m-d', strtotime('-6 day', time())) : $_REQUEST['timestart'];
$endDate = empty($_REQUEST['timeend']) ? date('Y-m-d') : $_REQUEST['timeend'];
$payStatus = isset($_REQUEST['pay_status']) ? $_REQUEST['pay_status'] : 1;
if ($id == 71) {
$payStatus = isset($_REQUEST['pay_real_status']) ? $_REQUEST['pay_real_status'] : 1;
}
$startTime = strtotime($startDate);
$endTime = strtotime($endDate) + 86399;
@ -1095,6 +1098,11 @@ class ExportController extends Controller
$map['spend_time'] = array('BETWEEN', array($startTime, $endTime));
}
$map['pay_status'] = $payStatus;
if ($id == 71) {
$map['pay_real_status'] = $payStatus;
} else {
$map['pay_status'] = $payStatus;
}
$is_sub_data = I("issubdata",0);
if($is_sub_data == 1){
@ -1213,6 +1221,11 @@ class ExportController extends Controller
if($payStatus > 0){
$map1 = $map;
$map1['pay_status'] = 1;
if ($id == 71) {
$map1['pay_real_status'] = 1;
} else {
$map1['pay_status'] = 1;
}
$total = $SpendModel->where($map1)->sum('pay_amount');
}
// var_dump($total);die();
@ -1250,6 +1263,10 @@ class ExportController extends Controller
'is_check' => '是否参与结算',
'promote_id' => "消费"."{$total}",
];
if ($id == 71) {
unset($headers['pay_status']);
$headers['pay_real_status'] = L('Order_status');
}
if ($showMarketAdmin == 0) {
unset($headers['market_admin_id']);
@ -1320,6 +1337,7 @@ class ExportController extends Controller
$companys = $companys ? array_column($companys, 'company_name', 'id') : [];
foreach($xlsData as $value) {
$payStatus = $id == 71 ? $value['pay_real_status'] : $value['pay_status'];
//游戏信息匹配
if(!$value['pay_time']) $value['pay_time'] = $value['spend_time'];
unset($value['spend_time']);
@ -1335,7 +1353,7 @@ class ExportController extends Controller
$value['company_name'] = $promoters[$value['promote_id']] == 0 ? '官方渠道' : ($companys[$promoters[$value['promote_id']]] ?? '');
unset($value['promote_id']);
$value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']);
if($value['pay_status'] == 1) {
if($payStatus == 1) {
$value['payed_time'] = date('Y-m-d H:i:s',$value['payed_time']);
}else {
$value['payed_time'] = "------";
@ -1348,7 +1366,11 @@ class ExportController extends Controller
}
$value['extend'] = $value['extend'].'`';
$value['pay_way'] = get_pay_way($value['pay_way']);
$value['pay_status'] = get_info_status($value['pay_status'],9);
if ($id == 71) {
$value['pay_real_status'] = get_info_status($value['pay_real_status'],9);
} else {
$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) {