From f3a662324d1f42b11e18b778b59b9cd1f91e50b9 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 26 Mar 2020 10:53:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B5=8B=E8=AF=95=E6=9C=8D?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=A3=80=E7=B4=A2=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/TestOrderController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php index ec50da15b..8f40fca77 100644 --- a/Application/Admin/Controller/TestOrderController.class.php +++ b/Application/Admin/Controller/TestOrderController.class.php @@ -22,7 +22,7 @@ class TestOrderController extends ThinkController $map['1'] = "1"; if (!empty($_REQUEST['server_type'])) { - $map['server_type'] = $_REQUEST['server_type']; + $map['t.server_type'] = $_REQUEST['server_type']; } if (!empty($_REQUEST['order_type'])||$_REQUEST['order_type'] == '0') { $map['order_type'] = $_REQUEST['order_type']; @@ -55,8 +55,8 @@ class TestOrderController extends ThinkController $v['game_name'] =clearGameNameType($v['game_name']); $v['sdk_version'] =getGameTypeName($v['sdk_version']); } - $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(); $count = $sum_order_amount['count']; $page = set_pagination($count, $row);