From ce665d86188cecef3ad33e6a6aac355a34b4f397 Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Sun, 17 Dec 2023 21:37:32 +0800 Subject: [PATCH] yh --- .../Controller/AdminController.class.php | 3 +- .../Controller/ExportController.class.php | 28 +++++++++++++++++-- Application/Admin/View/Spend/listsMime.html | 6 ++-- Application/Common/Api/GameApi.class.php | 4 +-- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/AdminController.class.php b/Application/Admin/Controller/AdminController.class.php index 7fb9047..ef868d7 100644 --- a/Application/Admin/Controller/AdminController.class.php +++ b/Application/Admin/Controller/AdminController.class.php @@ -45,7 +45,8 @@ class AdminController extends Controller { } $rule = strtolower(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME); $outPayRules = [ - 'admin/spend/listsmime' + 'admin/spend/listsmime', + 'admin/repair/repairedit', ]; if (in_array($rule, $outPayRules) && !isOutPaySite()) { die('地址错误'); diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index a7ead71..4c2687b 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -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) { diff --git a/Application/Admin/View/Spend/listsMime.html b/Application/Admin/View/Spend/listsMime.html index 6415740..16c0095 100644 --- a/Application/Admin/View/Spend/listsMime.html +++ b/Application/Admin/View/Spend/listsMime.html @@ -219,13 +219,13 @@ -
+ @@ -408,7 +408,7 @@
- 导出 + 导出 {$_page|default=''}
diff --git a/Application/Common/Api/GameApi.class.php b/Application/Common/Api/GameApi.class.php index 93af900..f1babb8 100644 --- a/Application/Common/Api/GameApi.class.php +++ b/Application/Common/Api/GameApi.class.php @@ -27,9 +27,7 @@ class GameApi { $pay_map['pay_order_number']=$param['out_trade_no']; $pay_data=$uc->uc_spend_find($pay_map['pay_order_number']); }else{ - - $pay_map['pay_order_number'] = $param['out_trade_no']; - $pay_data = M("Spend","tab_")->where($pay_map)->find(); + $pay_data = M("Spend","tab_")->where('((pay_status=1 and pay_way != 41) or (pay_real_status=1 and pay_way=41)) and pay_game_status=0 and pay_order_number="' . $param['out_trade_no'] . '"')->find(); } if(empty($pay_data)){