1
This commit is contained in:
parent
db1dfa1a5f
commit
bbf091b8bd
@ -71,21 +71,21 @@ class NftController extends BaseAuthedController
|
||||
$details = array();
|
||||
switch ($nftDb['token_type']){
|
||||
case Nft::HERO_TYPE : {
|
||||
$heroDb = Hero::findByTokenId($nftDb['token_id']);
|
||||
$heroDb = Hero::findByTokenId2($nftDb['token_id']);
|
||||
if ($heroDb){
|
||||
$details = Hero::toDto($heroDb);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Nft::EQUIP_TYPE : {
|
||||
$gunDb = Gun::findByTokenId($nftDb['token_id']);
|
||||
$gunDb = Gun::findByTokenId2($nftDb['token_id']);
|
||||
if ($gunDb){
|
||||
$details = Gun::toDto($gunDb);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Nft::CHIP_TYPE : {
|
||||
$chipDb = Chip::findByTokenId($nftDb['token_id']);
|
||||
$chipDb = Chip::findByTokenId2($nftDb['token_id']);
|
||||
if ($chipDb){
|
||||
$details = Chip::toDto($chipDb);
|
||||
}
|
||||
|
@ -77,6 +77,18 @@ class Chip extends BaseModel
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function findByTokenId2($tokenId)
|
||||
{
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getMysql($tokenId),
|
||||
't_chip',
|
||||
array(
|
||||
'token_id' => $tokenId,
|
||||
)
|
||||
);
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function getChipList($cb)
|
||||
{
|
||||
SqlHelper::ormSelect(
|
||||
|
Loading…
x
Reference in New Issue
Block a user