From 282033afe758e3d2f541aa3322ac6a05b418b422 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Wed, 12 Feb 2020 10:28:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A2=E5=8D=95=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E6=B7=BB=E5=8A=A0=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/TestOrderController.class.php | 11 +++++++++-- Application/Admin/View/TestOrder/lists.html | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) 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 @@
- {$_page|default=''}