From 6abef9385e3fbd2dae3ee7b5530f25df38880927 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 26 Mar 2020 16:34:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=8B=E8=AF=95=E6=9C=8D?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 2b664b965..2d48c4a3c 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -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) {