1
This commit is contained in:
parent
100831efa7
commit
5ae75c45b5
@ -49,6 +49,7 @@ CREATE TABLE `t_box_order` (
|
||||
`order_id` varchar(60) NOT NULL DEFAULT '' COMMENT '订单id',
|
||||
`type` varchar(60) NOT NULL DEFAULT '' COMMENT 'type',
|
||||
`buyer_address` varchar(60) NOT NULL DEFAULT '' COMMENT '购买者',
|
||||
`raw_buyer_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'raw购买者',
|
||||
`price` varchar(60) NOT NULL DEFAULT '' COMMENT 'price',
|
||||
`payment_token_address` varchar(60) NOT NULL DEFAULT '' COMMENT '货币地址',
|
||||
`nonce` varchar(60) NOT NULL DEFAULT '' COMMENT 'nonce',
|
||||
@ -137,9 +138,11 @@ CREATE TABLE `t_buy_record` (
|
||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`blobdata` mediumblob COMMENT 'blobdata',
|
||||
`buyer_address` mediumblob COMMENT 'buyer_address',
|
||||
`order_id` varchar(60) COMMENT '订单id',
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||
PRIMARY KEY (`idx`)
|
||||
PRIMARY KEY (`idx`),
|
||||
KEY `order_id` (`order_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -87,7 +87,8 @@ class MarketController extends BaseController {
|
||||
{
|
||||
$token = getReqVal('token', '');
|
||||
$type = getReqVal('type', '');
|
||||
$buyerAddress = getReqVal('buyer_address', '');
|
||||
$rawBuyerAddress = getReqVal('buyer_address', '');
|
||||
$buyerAddress = strtolower($rawBuyerAddress);
|
||||
$price = getReqVal('price', '');
|
||||
$paymentTokenAddress = getReqVal('payment_token_address', '');
|
||||
$nonce = getReqVal('nonce', '');
|
||||
@ -194,6 +195,7 @@ class MarketController extends BaseController {
|
||||
'batch_idx' => $currBatchMeta['id'],
|
||||
'order_id' => $orderId,
|
||||
'type' => $type,
|
||||
'raw_buyer_address' => $rawBuyerAddress,
|
||||
'buyer_address' => $buyerAddress,
|
||||
'price' => $price,
|
||||
'payment_token_address' => $paymentTokenAddress,
|
||||
|
@ -36,6 +36,16 @@ class BuyRecord extends BaseModel {
|
||||
'errmsg' => 'server internal error'
|
||||
)));
|
||||
}
|
||||
SqlHelper::update
|
||||
(myself()->_getMarketMysql(),
|
||||
't_buy_record',
|
||||
array(
|
||||
'idx' => $lastIdx
|
||||
),
|
||||
array(
|
||||
'order_id' => $orderId
|
||||
)
|
||||
);
|
||||
return $orderId;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user