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);