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