|
|
|
@ -2151,7 +2151,7 @@ class ExportController extends Controller
|
|
|
|
|
$xlsCell = array(
|
|
|
|
|
array('type', '类型'),
|
|
|
|
|
array('pay_order_number', '支付订单号'),
|
|
|
|
|
array('order_number', 'CP订单号'),
|
|
|
|
|
array('extend', 'CP订单号'),
|
|
|
|
|
array('pay_time', '充值时间'),
|
|
|
|
|
array('user_account', '玩家账号'),
|
|
|
|
|
array('promote_account', '所属推广员'),
|
|
|
|
@ -2169,6 +2169,9 @@ class ExportController extends Controller
|
|
|
|
|
$map['tab_repair_pay.create_time'] = array('BETWEEN', [$startTime, $endTime]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($params['type'])) {
|
|
|
|
|
$map['tab_spend.extend'] = $params['extend'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($params['type'])) {
|
|
|
|
|
$map['tab_repair_pay.type'] = $params['type'];
|
|
|
|
@ -2183,8 +2186,8 @@ class ExportController extends Controller
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!empty(I('get.order_number'))) {
|
|
|
|
|
$map['tab_spend.order_number'] = I('get.order_number');
|
|
|
|
|
if(!empty(I('get.extend'))) {
|
|
|
|
|
$map['tab_spend.extend'] = I('get.extend');
|
|
|
|
|
$data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->order('tab_repair_pay.id DESC')->select();
|
|
|
|
|
} else {
|
|
|
|
|
$data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->order('id DESC')->select();
|
|
|
|
@ -2193,13 +2196,13 @@ class ExportController extends Controller
|
|
|
|
|
$xlsData = [];
|
|
|
|
|
foreach($data as $k => $v) {
|
|
|
|
|
if($v['tab'] == 'spend') {
|
|
|
|
|
$order_detail = M('spend', 'tab_')->field('order_number,pay_time,user_account,promote_account,game_name,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
|
|
|
|
|
$order_detail = M('spend', 'tab_')->field('extend,pay_time,user_account,promote_account,game_name,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
|
|
|
|
|
$re_data['pay_time'] = set_show_time($order_detail['pay_time']);
|
|
|
|
|
} elseif($v['tab'] == 'deposit') {
|
|
|
|
|
$order_detail = M('deposit', 'tab_')->field('order_number,create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
|
|
|
|
|
$order_detail = M('deposit', 'tab_')->field('create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
|
|
|
|
|
$re_data['pay_time'] = set_show_time($order_detail['create_time']);
|
|
|
|
|
}
|
|
|
|
|
$re_data['order_number'] = !empty($order_detail['order_number']) ? $order_detail['order_number'] : '-';
|
|
|
|
|
$re_data['extend'] = !empty($order_detail['extend']) ? $order_detail['extend'] : '-';
|
|
|
|
|
$re_data['user_account'] = $order_detail['user_account'];
|
|
|
|
|
$re_data['promote_account'] = $order_detail['promote_account'];
|
|
|
|
|
$re_data['game_name'] = !empty($order_detail['game_name']) ? $order_detail['game_name'] : '-';
|
|
|
|
|