diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php index c6b5e24d0..e022e39f5 100644 --- a/Application/Admin/Controller/TestOrderController.class.php +++ b/Application/Admin/Controller/TestOrderController.class.php @@ -36,10 +36,23 @@ class TestOrderController extends ThinkController if (!empty($_REQUEST['pay_way'])) { $map['pay_way'] = $_REQUEST['pay_way']; } - - + if(!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])){ + $timestart = strtotime($_REQUEST['timestart']); + $timeend = strtotime($_REQUEST['timeend'])+86399; + $map['pay_time'] = array("between",array($timestart,$timeend)); + }else if(!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) { + $timestart = strtotime($_REQUEST['timestart']); + $map['pay_time'] = array("EGT",$timestart); + }else if (!empty($_REQUEST['timeend']) && empty($_REQUEST['timestart'])) { + $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(); + $sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find(); $this->assign('datas', $order_list); + $this->assign('sum_order_amount', $sum_order_amount); + $this->assign('sum_pay_amount', $sum_pay_amount); $this->display(); } diff --git a/Application/Admin/View/TestOrder/lists.html b/Application/Admin/View/TestOrder/lists.html index bb24da4b4..d4d8c326e 100644 --- a/Application/Admin/View/TestOrder/lists.html +++ b/Application/Admin/View/TestOrder/lists.html @@ -63,10 +63,10 @@  
- + -
- +
@@ -163,29 +163,18 @@ 总计 - ------ ------ ------ - ------ - ------ - ------ - {$sumAllData.cost} - {$sumAllData.pay_amount} ------ ------ - - - 充值方式合计 - - - - {$key}:{$payTypeData}          - - - + ------ + ------ + {$sum_order_amount['sum_order_amount']} + {$sum_pay_amount['sum_order_amount']} + ------ + ------ -