1
This commit is contained in:
parent
038a7b1bc0
commit
0d5cba7193
@ -73,6 +73,20 @@ class BlockChain(object):
|
||||
['trans_req', _common.MFTransactionRequest(), '调用合约参数'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'mintGoldBullion',
|
||||
'desc': 'mint金砖',
|
||||
'group': 'BlockChain',
|
||||
'url': 'webapp/index.php?c=BlockChain&a=mintGoldBullion',
|
||||
'params': [
|
||||
['type', 0, '1:1w金币 2:10w金币'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['trans_id', '', '事务id'],
|
||||
['trans_req', _common.MFTransactionRequest(), '调用合约参数'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'buyDiamond(废弃)',
|
||||
'desc': '购买钻石',
|
||||
|
@ -1792,6 +1792,7 @@ CREATE TABLE `t_gold_bullion` (
|
||||
`src_address` varchar(60) COMMENT 'src_address',
|
||||
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_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 '金币',
|
||||
`status` int(11) NOT NULL DEFAULT '0' COMMENT '状态 0:初始 1:已开',
|
||||
`open_status` int(11) NOT NULL DEFAULT '0' COMMENT '1: 已发送 2:未发送 3:已领取',
|
||||
|
@ -25,6 +25,8 @@ define('V_ITEM_REVIVE_COIN', 140001); //复活币
|
||||
define('V_ITEM_HERO_META', 100005); //英雄升级材料
|
||||
define('V_ITEM_GUN_META', 100006); //枪械升级材料
|
||||
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_ACTIVE', 8002);
|
||||
|
@ -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)
|
||||
{
|
||||
$params = array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user