This commit is contained in:
aozhiwei 2022-01-27 13:57:01 +08:00
parent 4cd98f00cd
commit d702a908cd
2 changed files with 7 additions and 2 deletions

View File

@ -29,6 +29,7 @@ DROP TABLE IF EXISTS `t_box_order`;
CREATE TABLE `t_box_order` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`order_id` varchar(60) NOT NULL DEFAULT '' COMMENT '订单id',
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT 'game id',
`batch_id` int(11) NOT NULL DEFAULT '0' COMMENT '批次号',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`state` int(11) NOT NULL DEFAULT '0' COMMENT 'state 0:待支付 1支付成功',
@ -66,6 +67,7 @@ DROP TABLE IF EXISTS `t_nft`;
CREATE TABLE `t_nft` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id',
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT 'game id',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`owner_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_id',
`owner_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_address',

View File

@ -119,6 +119,7 @@ class MarketController extends BaseController {
$paymentTokenAddress = getReqVal('payment_token_address', '');
$nonce = getReqVal('nonce', '');
$signature = getReqVal('signature', '');
$gameId = 2006;
if (empty($type) ||
empty($buyerAddress) ||
@ -136,10 +137,10 @@ class MarketController extends BaseController {
return;
}
if (!$this->isTestMode() && BoxOrder::isBuyed($buyerAddress, $currBatchMeta['batch_id'])) {
/*if (!$this->isTestMode() && BoxOrder::isBuyed($buyerAddress, $currBatchMeta['batch_id'])) {
myself()->_rspErr(1, 'account can only choose 1 hero to purchase');
return;
}
}*/
if ($this->isTestMode()) {
$orderId = myself()->_getNowTime();
@ -150,6 +151,7 @@ class MarketController extends BaseController {
't_box_order',
array(
'batch_id' => $currBatchMeta['batch_id'],
'game_id' => $gameId,
'order_id' => $orderId,
'item_id' => $itemId,
'state' => 1,
@ -169,6 +171,7 @@ class MarketController extends BaseController {
't_nft',
array(
'token_id' => $tokenId,
'game_id' => $gameId,
'item_id' => $itemId,
'owner_id' => $buyerAddress,
'owner_address' => $buyerAddress,