|
|
|
@ -2409,35 +2409,35 @@ class ExportController extends Controller
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if(isset($params['server_type'])) {
|
|
|
|
|
$map['tab_test_order.server_type'] = $params['server_type'];
|
|
|
|
|
$map['t.server_type'] = $params['server_type'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($params['order_type'])) {
|
|
|
|
|
$map['tab_test_order.order_type'] = $params['order_type'];
|
|
|
|
|
$map['t.order_type'] = $params['order_type'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($params['order_no'])) {
|
|
|
|
|
$map['tab_test_order.order_no'] = $params['order_no'];
|
|
|
|
|
$map['t.order_no'] = $params['order_no'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($params['user_account'])) {
|
|
|
|
|
$map['tab_test_order.user_account'] = $params['user_account'];
|
|
|
|
|
$map['t.user_account'] = $params['user_account'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($params['pay_way'])) {
|
|
|
|
|
$map['tab_test_order.pay_way'] = $params['pay_way'];
|
|
|
|
|
$map['t.pay_way'] = $params['pay_way'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!empty($params['timestart']) && !empty($params['timeend'])){
|
|
|
|
|
$timestart = strtotime($params['timestart']);
|
|
|
|
|
$timeend = strtotime($params['timeend'])+86399;
|
|
|
|
|
$map['tab_test_order.pay_time'] = array("between",array($timestart,$timeend));
|
|
|
|
|
$map['t.pay_time'] = array("between",array($timestart,$timeend));
|
|
|
|
|
}else if(!empty($params['timestart']) && empty($params['timeend'])) {
|
|
|
|
|
$timestart = strtotime($params['timestart']);
|
|
|
|
|
$map['tab_test_order.pay_time'] = array("EGT",$timestart);
|
|
|
|
|
$map['t.pay_time'] = array("EGT",$timestart);
|
|
|
|
|
}else if (!empty($params['timeend']) && empty($params['timestart'])) {
|
|
|
|
|
$timeend = strtotime($params['timeend'])+86399;
|
|
|
|
|
$map['tab_test_order.pay_time'] = array("ELT",$timeend);
|
|
|
|
|
$map['t.pay_time'] = array("ELT",$timeend);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2445,8 +2445,8 @@ class ExportController extends Controller
|
|
|
|
|
->field("t.*,g.sdk_version")
|
|
|
|
|
->join("tab_game g on t.game_id = g.id","left")
|
|
|
|
|
->where($map)->order('add_time desc')->select();
|
|
|
|
|
$sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount,count(1) as count')->find();
|
|
|
|
|
$sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find();
|
|
|
|
|
$sum_order_amount = M('test_order', 'tab_')->alias("t")->where($map)->field('sum(order_amount) as sum_order_amount,count(1) as count')->find();
|
|
|
|
|
$sum_pay_amount = M('test_order', 'tab_')->alias("t")->where($map)->field('sum(pay_amount) as sum_order_amount')->find();
|
|
|
|
|
$xlsData = [];
|
|
|
|
|
foreach($orderData as $k => $v) {
|
|
|
|
|
if ($v['server_type'] == 1) {
|
|
|
|
|