This commit is contained in:
aozhiwei 2020-10-20 11:42:36 +08:00
parent 7864689ee6
commit a12be7649a
2 changed files with 10 additions and 8 deletions

View File

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

View File

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