1
This commit is contained in:
parent
ab99ed726d
commit
ce2df6a0e9
@ -152,11 +152,27 @@ class Nft extends BaseModel {
|
||||
'token_id' => $tokenId,
|
||||
)
|
||||
);
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function findNftByOwner($owner,$tokenId){
|
||||
if (!$owner || !$tokenId){
|
||||
return;
|
||||
}
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getMarketMysql(),
|
||||
't_nft',
|
||||
array(
|
||||
'owner_address'=>$owner,
|
||||
'token_id' => $tokenId,
|
||||
)
|
||||
);
|
||||
if (!$row){
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getMarketMysql(),
|
||||
't_nft1155',
|
||||
array(
|
||||
'owner_address'=>$owner,
|
||||
'token_id' => $tokenId,
|
||||
)
|
||||
);
|
||||
@ -169,6 +185,7 @@ class Nft extends BaseModel {
|
||||
$row['token_type'] = self::FRAGMENT_TYPE;
|
||||
$row['token_state'] = 0;
|
||||
$row['tags'] = '';
|
||||
$row['item_id'] = $row['token_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -283,6 +300,11 @@ class Nft extends BaseModel {
|
||||
case Nft::CHIP_TYPE:
|
||||
{
|
||||
$nft['hide_attr'] = 1;
|
||||
}
|
||||
break;
|
||||
case Nft::FRAGMENT_TYPE:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user