From d0de91e89de386d82824e6986e77a75aced58fd1 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Tue, 11 Feb 2020 18:21:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/TestOrderController.class.php | 17 ++++++++++-- Application/Admin/View/TestOrder/lists.html | 27 ++++++------------- 2 files changed, 23 insertions(+), 21 deletions(-) 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']} + ------ + ------ - From 282033afe758e3d2f541aa3322ac6a05b418b422 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Wed, 12 Feb 2020 10:28:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=BD=95=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=''}
From bdbbeab1a012ce290aa1384c58f5f75d12f5672c Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Wed, 12 Feb 2020 10:31:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=BD=95=E5=85=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Data/update.sql b/Data/update.sql index cf7f2f909..c2e2bfc62 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1101,3 +1101,22 @@ ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显 ALTER TABLE `tab_promote_belong` ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是'; + +-- 添加测试订单录入表 郑昌隆 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;