This commit is contained in:
aozhiwei 2024-06-13 10:31:10 +08:00
parent 038a7b1bc0
commit 0d5cba7193
4 changed files with 40 additions and 0 deletions

View File

@ -73,6 +73,20 @@ class BlockChain(object):
['trans_req', _common.MFTransactionRequest(), '调用合约参数'], ['trans_req', _common.MFTransactionRequest(), '调用合约参数'],
] ]
}, },
{
'name': 'mintGoldBullion',
'desc': 'mint金砖',
'group': 'BlockChain',
'url': 'webapp/index.php?c=BlockChain&a=mintGoldBullion',
'params': [
['type', 0, '11w金币 210w金币'],
],
'response': [
_common.RspHead(),
['trans_id', '', '事务id'],
['trans_req', _common.MFTransactionRequest(), '调用合约参数'],
]
},
{ {
'name': 'buyDiamond(废弃)', 'name': 'buyDiamond(废弃)',
'desc': '购买钻石', 'desc': '购买钻石',

View File

@ -1792,6 +1792,7 @@ CREATE TABLE `t_gold_bullion` (
`src_address` varchar(60) COMMENT 'src_address', `src_address` varchar(60) COMMENT 'src_address',
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id',
`net_id` int(11) NOT NULL DEFAULT '0' COMMENT '链id', `net_id` int(11) NOT NULL DEFAULT '0' COMMENT '链id',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`gold` bigint NOT NULL DEFAULT '0' COMMENT '金币', `gold` bigint NOT NULL DEFAULT '0' COMMENT '金币',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '状态 0:初始 1:已开', `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态 0:初始 1:已开',
`open_status` int(11) NOT NULL DEFAULT '0' COMMENT '1: 已发送 2未发送 3:已领取', `open_status` int(11) NOT NULL DEFAULT '0' COMMENT '1: 已发送 2未发送 3:已领取',

View File

@ -25,6 +25,8 @@ define('V_ITEM_REVIVE_COIN', 140001); //复活币
define('V_ITEM_HERO_META', 100005); //英雄升级材料 define('V_ITEM_HERO_META', 100005); //英雄升级材料
define('V_ITEM_GUN_META', 100006); //枪械升级材料 define('V_ITEM_GUN_META', 100006); //枪械升级材料
define('V_ITEM_CHIP_META', 100007); //芯片升级材料 define('V_ITEM_CHIP_META', 100007); //芯片升级材料
define('V_ITEM_GOLD_BULLION_1W', 10017); //金砖1w
define('V_ITEM_GOLD_BULLION_10W', 10018); //金砖10w
define('TN_BEGIN', 8001); define('TN_BEGIN', 8001);
define('TN_ACTIVE', 8002); define('TN_ACTIVE', 8002);

View File

@ -165,6 +165,29 @@ class BlockChainController extends BaseAuthedController {
} }
} }
public function mintGoldBullion()
{
$type = getReqVal('type', 0);
$itemId = 0;
switch ($type) {
case 1:
{
$itemId = V_ITEM_GOLD_BULLION_1W;
}
break;
case 2:
{
$itemId = V_ITEM_GOLD_BULLION_10W;
}
break;
default:
{
return;
}
}
}
private function internalActivate721Nft($tokenId, $tokenType, $itemUniId, $itemId) private function internalActivate721Nft($tokenId, $tokenType, $itemUniId, $itemId)
{ {
$params = array( $params = array(