master
elf 11 months ago
parent 6c62b31012
commit ce665d8618

@ -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('地址错误');

@ -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) {

@ -219,13 +219,13 @@
</div>
</div>
<div class="butnbox" >
<!-- <div class="butnbox" >
<div class="butnlist jscheckbutn" style="margin-left: 2px">
<foreach name="menubtn" item="vo" >
{$vo}
</foreach>
</div>
</div>
</div> -->
<!-- 数据列表 -->
@ -408,7 +408,7 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>7,'xlsname'=>'游戏订单_游戏充值','timestart'=>$startDate,'timeend'=>$endDate),I('get.')))}">导出</a>
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>71,'xlsname'=>'游戏订单_游戏充值','timestart'=>$startDate,'timeend'=>$endDate),I('get.')))}">导出</a>
</if>
{$_page|default=''}
</div>

@ -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)){

Loading…
Cancel
Save