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