1
This commit is contained in:
parent
a4b9728727
commit
67f159d31c
@ -82,13 +82,13 @@ DROP TABLE IF EXISTS `receipt`;
|
||||
CREATE TABLE `receipt` (
|
||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`receipt_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票据id',
|
||||
`orderid` varchar(255) DEFAULT '' COMMENT '订单id',
|
||||
`account_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'account_id',
|
||||
`roleid` varchar(255) NOT NULL DEFAULT '' COMMENT '角色id',
|
||||
`server_id` int(11) NOT NULL DEFAULT '0' COMMENT 'server_id',
|
||||
`server_id ` int(11) NOT NULL DEFAULT '0' COMMENT 'server_id',
|
||||
`channel` int(11) NOT NULL DEFAULT '0' COMMENT 'channel',
|
||||
`gameid` int(11) NOT NULL DEFAULT '0' COMMENT 'gameid',
|
||||
`itemid` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
|
||||
`price` int(11) NOT NULL DEFAULT '0' COMMENT 'price',
|
||||
`ipv4` varchar(50) NOT NULL DEFAULT '' COMMENT 'ipv4地址',
|
||||
`receipt_data` mediumblob COMMENT '票据信息',
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
|
@ -65,6 +65,42 @@ class OrderCtrl {
|
||||
return $row;
|
||||
}
|
||||
|
||||
public function getReceipt($receipt_id)
|
||||
{
|
||||
$conn = $this->getMysql($this->getStrDNA($receipt_id));
|
||||
$row = $conn->execQueryOne('SELECT receipt_id, account_id, roleid, orderid FROM receipt ' .
|
||||
'WHERE receipt_id=:receipt_id;',
|
||||
array(
|
||||
':receipt_id' => $receipt_id
|
||||
)
|
||||
);
|
||||
return $row;
|
||||
}
|
||||
|
||||
public function addReceipt($receipt_info)
|
||||
{
|
||||
$gameid = phpcommon\extractGameId($receipt_info['account_id']);
|
||||
$conn = $this->getMysql($this->getStrDNA($receipt_info['receipt_id']));
|
||||
$conn->execScript('INSERT INTO receipt( ' .
|
||||
' receipt_id, orderid, account_id, roleid, server_id, channel, ' .
|
||||
' gameid, itemid, ipv4, receipt_data, createtime) ' .
|
||||
'VALUES (:receipt_id, :orderid, :account_id, :roleid, :server_id, :channel, ' .
|
||||
' :gameid, :itemid, :ipv4, :receipt_data, :createtime);',
|
||||
array(
|
||||
':receipt_id' => $receipt_info['receipt_id'],
|
||||
':orderid' => $receipt_info['orderid'],
|
||||
':account_id' => $receipt_info['account_id'],
|
||||
':roleid' => $receipt_info['roleid'],
|
||||
':server_id' => $receipt_info['server_id'],
|
||||
':channel' => $receipt_info['channel'],
|
||||
':gameid' => $gameid,
|
||||
':itemid' => $receipt_info['itemid'],
|
||||
':ipv4' => phpcommon\getIPv4(),
|
||||
':receipt_data' => $receipt_info['receipt_data'],
|
||||
':createtime' => time(),
|
||||
));
|
||||
}
|
||||
|
||||
public function addPreOrder($pre_order_info)
|
||||
{
|
||||
$pre_order_info['sp_orderid'] = '';
|
||||
|
@ -33,10 +33,18 @@ class BaseSdk
|
||||
{
|
||||
}
|
||||
|
||||
public function getPendingOrderList()
|
||||
{
|
||||
}
|
||||
|
||||
public function payNotify()
|
||||
{
|
||||
}
|
||||
|
||||
public function deliver()
|
||||
{
|
||||
}
|
||||
|
||||
public function queryOrderInfo()
|
||||
{
|
||||
$order_info = $this->order_ctrl->getOrder($_REQUEST['cp_orderid']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user