1
This commit is contained in:
parent
7614d7ff24
commit
5888f6d675
@ -205,6 +205,12 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$nftDb = Chip::findByTokenId($tokenId1);
|
||||||
|
if (!$nftDb) {
|
||||||
|
myself()->_rspErr(1, 'token_id1 paramater error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->internalBcCall(
|
$this->internalBcCall(
|
||||||
array(
|
array(
|
||||||
'c' => 'BcService',
|
'c' => 'BcService',
|
||||||
@ -219,8 +225,8 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
'action' => Transaction::EVOLVE_CHIP_ACTION_TYPE,
|
'action' => Transaction::EVOLVE_CHIP_ACTION_TYPE,
|
||||||
'tokenId' => $tokenId1,
|
'tokenId' => $tokenId1,
|
||||||
'itemType' => 0,
|
'itemType' => 0,
|
||||||
'itemUniId' => 0,
|
'itemUniId' => $nftDb['chip_uniid'],
|
||||||
'itemId' => 0
|
'itemId' => $nftDb['item_id']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,13 @@ class Chip extends BaseModel
|
|||||||
'token_id' => $tokenId
|
'token_id' => $tokenId
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
if ($row) {
|
||||||
|
$row['chip_uniid'] = $row['idx'];
|
||||||
|
if (NftService::getChipBlance(myself()->_getOpenId(), $tokenId) <= 0) {
|
||||||
|
$row = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getChipList($cb)
|
public static function getChipList($cb)
|
||||||
|
@ -87,6 +87,19 @@ class Nft extends BaseModel {
|
|||||||
return $nftList;
|
return $nftList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getChipBlance($account, $tokenId)
|
||||||
|
{
|
||||||
|
$row = SqlHelper::ormSelectOne(
|
||||||
|
myself()->_getMarketMysql(),
|
||||||
|
't_nft1155',
|
||||||
|
array(
|
||||||
|
'owner_address' => $account,
|
||||||
|
'token_id' => $tokenId,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return $row ? $row['balance'] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
public static function getNftListByType($account, $type)
|
public static function getNftListByType($account, $type)
|
||||||
{
|
{
|
||||||
$nftList = array();
|
$nftList = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user