Merge branch 'hotfix/test_order' into release

# Conflicts:
#	Data/update.sql
master
zhengchanglong 5 years ago
commit 9b43cc90b4

@ -47,9 +47,16 @@ class TestOrderController extends ThinkController
$timeend = strtotime($_REQUEST['timeend'])+86399; $timeend = strtotime($_REQUEST['timeend'])+86399;
$map['pay_time'] = array("ELT",$timeend); $map['pay_time'] = array("ELT",$timeend);
} }
$order_list = M('test_order', 'tab_')->where($map)->select(); $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')->find(); $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(); $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('datas', $order_list);
$this->assign('sum_order_amount', $sum_order_amount); $this->assign('sum_order_amount', $sum_order_amount);
$this->assign('sum_pay_amount', $sum_pay_amount); $this->assign('sum_pay_amount', $sum_pay_amount);

@ -180,7 +180,6 @@
</div> </div>
</div> </div>
<div class="page"> <div class="page">
{$_page|default=''} {$_page|default=''}
</div> </div>
</block> </block>

@ -1221,3 +1221,22 @@ CREATE TABLE `tab_partner_divide_warn` (
`operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID', `operater_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; ) 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;

Loading…
Cancel
Save