1
This commit is contained in:
parent
9ca5642e27
commit
19e15d568e
@ -3,6 +3,7 @@ use phpcommon\SqlHelper;
|
||||
require_once('models/Nft.php');
|
||||
require_once('models/User.php');
|
||||
require_once('models/Hero.php');
|
||||
require_once('services/NftService.php');
|
||||
require_once('mt/NftDesc.php');
|
||||
require_once('mt/Hero.php');
|
||||
require_once('mt/EconomyAttribute.php');
|
||||
@ -129,6 +130,11 @@ class OutAppNftController extends BaseController {
|
||||
));
|
||||
}
|
||||
|
||||
public function hasLockedNft()
|
||||
{
|
||||
$accountAddress = strtolower(getReqVal('account_address', ''));
|
||||
}
|
||||
|
||||
public function nftMetaView()
|
||||
{
|
||||
$netId = getReqVal('net_id', '');
|
||||
|
@ -131,6 +131,24 @@ class Nft extends BaseModel
|
||||
return $nftList;
|
||||
}
|
||||
|
||||
public static function getOwnerNftListByType($account, $type)
|
||||
{
|
||||
$nftList = array();
|
||||
SqlHelper::ormSelect(
|
||||
myself()->_getMarketMysql(),
|
||||
't_nft',
|
||||
array(
|
||||
'owner_address' => $account,
|
||||
'token_type' => $type,
|
||||
'deleted' => 0,
|
||||
),
|
||||
function ($row) use (&$nftList) {
|
||||
array_push($nftList, $row);
|
||||
}
|
||||
);
|
||||
return $nftList;
|
||||
}
|
||||
|
||||
public static function getNft1155List($account, $type)
|
||||
{
|
||||
|
||||
|
@ -164,14 +164,21 @@ class NftService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
public static function hasLockedNft($accountAddress)
|
||||
public static function hasAnyNft($accountAddress)
|
||||
{
|
||||
$nftList = Nft::getNftListByType($accountAddress, Nft::HERO_TYPE);
|
||||
if (empty($nftList) || count($nftList) <= 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
{
|
||||
$nftList = Nft::getNftListByType($accountAddress, Nft::HERO_TYPE);
|
||||
if (!empty($nftList) || count($nftList) > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
{
|
||||
$nftList = Nft::getOwnerNftListByType($accountAddress, Nft::HERO_TYPE);
|
||||
if (!empty($nftList) || count($nftList) > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user