diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php index e022e39f5..4a7d948eb 100644 --- a/Application/Admin/Controller/TestOrderController.class.php +++ b/Application/Admin/Controller/TestOrderController.class.php @@ -47,9 +47,16 @@ class TestOrderController extends ThinkController $timeend = strtotime($_REQUEST['timeend'])+86399; $map['pay_time'] = array("ELT",$timeend); } - $order_list = M('test_order', 'tab_')->where($map)->select(); - $sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount')->find(); + $order_list = M('test_order', 'tab_')->where($map)->page($page,$row)->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(); + + $count = $sum_order_amount['count']; + $page = set_pagination($count, $row); + if ($page) { + $this->assign('_page', $page);//分页 + } + $this->assign('datas', $order_list); $this->assign('sum_order_amount', $sum_order_amount); $this->assign('sum_pay_amount', $sum_pay_amount); diff --git a/Application/Admin/View/TestOrder/lists.html b/Application/Admin/View/TestOrder/lists.html index d4d8c326e..959b25c44 100644 --- a/Application/Admin/View/TestOrder/lists.html +++ b/Application/Admin/View/TestOrder/lists.html @@ -180,7 +180,6 @@