From a12be7649a1e5d56ad059bf7c5c198887e8f3252 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 20 Oct 2020 11:42:36 +0800 Subject: [PATCH] 1 --- sql/paydb.sql | 6 ++++-- webapp/classes/OrderCtrl.php | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sql/paydb.sql b/sql/paydb.sql index 52a39c3..7694c98 100644 --- a/sql/paydb.sql +++ b/sql/paydb.sql @@ -54,17 +54,19 @@ CREATE TABLE `orderinfo` ( `sp_orderid` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '平台的订单id', `sp_amount` int(11) NOT NULL DEFAULT '0' COMMENT 'sp_amount', - `sp_confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT '平台确认时间', + `sp_confirmtime` int(11) NOT NULL DEFAULT '0' COMMENT '平台确认时间', `sp_pay_result` int(11) NOT NULL DEFAULT '0' COMMENT '0: 未确认 1: 支付成功 -1:支付失败', PRIMARY KEY (`idx`), UNIQUE KEY `orderid` (`orderid`), KEY `account_id` (`account_id`), + KEY `roleid` (`roleid`), + KEY `server_id` (`server_id`), KEY `openid` (`openid`), KEY `channel` (`channel`), KEY `unified_channel` (`unified_channel`), KEY `createtime` (`createtime`), - KEY `sp_confirm_time` (`sp_confirm_time`), + KEY `sp_confirmtime` (`sp_confirmtime`), KEY `sp_orderid` (`sp_orderid`), KEY `gameid` (`gameid`) ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/webapp/classes/OrderCtrl.php b/webapp/classes/OrderCtrl.php index c8a0a26..81ef55c 100644 --- a/webapp/classes/OrderCtrl.php +++ b/webapp/classes/OrderCtrl.php @@ -69,7 +69,7 @@ class OrderCtrl { { $pre_order_info['sp_orderid'] = ''; $pre_order_info['sp_amount'] = 0; - $pre_order_info['sp_confirm_time'] = 0; + $pre_order_info['sp_confirmtime'] = 0; $pre_order_info['sp_pay_result'] = 0; return $this->internalAddOrder($pre_order_info); } @@ -84,13 +84,13 @@ class OrderCtrl { ' poly_sdk_channel, unified_channel, ' . ' gameid, openid, itemid, try_count, price, ipv4, status, ' . ' confirmtime, createtime, sp_orderid, sp_amount, ' . - ' sp_confirm_time, sp_pay_result ' . + ' sp_confirmtime, sp_pay_result ' . ' ) ' . 'VALUES (:orderid, :account_id, :roleid, :server_id, :channel, ' . ' :poly_sdk_channel, :unified_channel, ' . ' :gameid, :openid, :itemid, :try_count, :price, :ipv4, :status, ' . ' :confirmtime, :createtime, :sp_orderid, :sp_amount, ' . - ' :sp_confirm_time, :sp_pay_result ' . + ' :sp_confirmtime, :sp_pay_result ' . ' );', array( ':orderid' => $order_info['orderid'], @@ -112,7 +112,7 @@ class OrderCtrl { ':sp_orderid' => $order_info['sp_orderid'], ':sp_amount' => $order_info['sp_amount'], - ':sp_confirm_time' => $order_info['sp_confirm_time'], + ':sp_confirmtime' => $order_info['sp_confirmtime'], ':sp_pay_result' => $order_info['sp_pay_result'], ) ); @@ -125,7 +125,7 @@ class OrderCtrl { $ret = $conn->execScript('UPDATE orderinfo SET ' . ' sp_orderid = :sp_orderid, ' . ' sp_amount = :sp_amount, ' . - ' sp_confirm_time = :sp_confirm_time, ' . + ' sp_confirmtime = :sp_confirmtime, ' . ' sp_pay_result = :sp_pay_result ' . 'WHERE orderid = :orderid;', array( @@ -133,7 +133,7 @@ class OrderCtrl { ':sp_orderid' => $sp_orderid, ':sp_amount' => $sp_amount, - ':sp_confirm_time' => time(), + ':sp_confirmtime' => time(), ':sp_pay_result' => 1, ) );