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=''}
diff --git a/Data/update.sql b/Data/update.sql index 8b3cd9b2e..7661366b7 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1221,3 +1221,22 @@ CREATE TABLE `tab_partner_divide_warn` ( `operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; + +-- 添加测试订单录入表 郑昌隆 2020-02-12 +DROP TABLE IF EXISTS `tab_test_order`; +CREATE TABLE `tab_test_order` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `order_type` tinyint(2) DEFAULT '0' COMMENT '0-未知,1-sdk充值,2-平台币充值,3-超级签充值', + `server_type` tinyint(2) DEFAULT '1' COMMENT '1-测试内网 2-测试外网', + `order_no` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '平台充值订单号', + `cp_order_no` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'CP订单号', + `user_account` varchar(30) COLLATE utf8mb4_bin DEFAULT '' COMMENT '用户账号', + `game_id` int(11) DEFAULT '0' COMMENT '游戏ID', + `game_name` varchar(30) COLLATE utf8mb4_bin DEFAULT '' COMMENT '游戏名称', + `order_amount` decimal(10,2) DEFAULT NULL COMMENT '订单金额', + `pay_amount` decimal(10,2) DEFAULT NULL COMMENT '支付金额', + `pay_time` int(11) DEFAULT '0' COMMENT '交易时间', + `pay_way` int(11) DEFAULT NULL COMMENT '-1绑币,0平台币,1支付宝,2微信,7金猪,9双乾支付-支付宝,10双乾支付-银联,15双乾支付-快捷', + `add_time` int(11) DEFAULT '0' COMMENT '添加时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;