1
This commit is contained in:
parent
4cd98f00cd
commit
d702a908cd
@ -29,6 +29,7 @@ DROP TABLE IF EXISTS `t_box_order`;
|
|||||||
CREATE TABLE `t_box_order` (
|
CREATE TABLE `t_box_order` (
|
||||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||||
`order_id` varchar(60) NOT NULL DEFAULT '' 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 '批次号',
|
`batch_id` int(11) NOT NULL DEFAULT '0' COMMENT '批次号',
|
||||||
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
|
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
|
||||||
`state` int(11) NOT NULL DEFAULT '0' COMMENT 'state 0:待支付 1:支付成功',
|
`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` (
|
CREATE TABLE `t_nft` (
|
||||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||||
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_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',
|
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
|
||||||
`owner_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_id',
|
`owner_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_id',
|
||||||
`owner_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_address',
|
`owner_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_address',
|
||||||
|
@ -119,6 +119,7 @@ class MarketController extends BaseController {
|
|||||||
$paymentTokenAddress = getReqVal('payment_token_address', '');
|
$paymentTokenAddress = getReqVal('payment_token_address', '');
|
||||||
$nonce = getReqVal('nonce', '');
|
$nonce = getReqVal('nonce', '');
|
||||||
$signature = getReqVal('signature', '');
|
$signature = getReqVal('signature', '');
|
||||||
|
$gameId = 2006;
|
||||||
|
|
||||||
if (empty($type) ||
|
if (empty($type) ||
|
||||||
empty($buyerAddress) ||
|
empty($buyerAddress) ||
|
||||||
@ -136,10 +137,10 @@ class MarketController extends BaseController {
|
|||||||
return;
|
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');
|
myself()->_rspErr(1, 'account can only choose 1 hero to purchase');
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if ($this->isTestMode()) {
|
if ($this->isTestMode()) {
|
||||||
$orderId = myself()->_getNowTime();
|
$orderId = myself()->_getNowTime();
|
||||||
@ -150,6 +151,7 @@ class MarketController extends BaseController {
|
|||||||
't_box_order',
|
't_box_order',
|
||||||
array(
|
array(
|
||||||
'batch_id' => $currBatchMeta['batch_id'],
|
'batch_id' => $currBatchMeta['batch_id'],
|
||||||
|
'game_id' => $gameId,
|
||||||
'order_id' => $orderId,
|
'order_id' => $orderId,
|
||||||
'item_id' => $itemId,
|
'item_id' => $itemId,
|
||||||
'state' => 1,
|
'state' => 1,
|
||||||
@ -169,6 +171,7 @@ class MarketController extends BaseController {
|
|||||||
't_nft',
|
't_nft',
|
||||||
array(
|
array(
|
||||||
'token_id' => $tokenId,
|
'token_id' => $tokenId,
|
||||||
|
'game_id' => $gameId,
|
||||||
'item_id' => $itemId,
|
'item_id' => $itemId,
|
||||||
'owner_id' => $buyerAddress,
|
'owner_id' => $buyerAddress,
|
||||||
'owner_address' => $buyerAddress,
|
'owner_address' => $buyerAddress,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user