1
This commit is contained in:
parent
946e626b41
commit
80afde40d0
33
webapp/models/LuckySymbol.php
Normal file
33
webapp/models/LuckySymbol.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace models;
|
||||||
|
|
||||||
|
require_once('mt/Item.php');
|
||||||
|
|
||||||
|
use mt;
|
||||||
|
use phpcommon\SqlHelper;
|
||||||
|
|
||||||
|
class LuckySymbol extends BaseModel {
|
||||||
|
|
||||||
|
public static function find($itemId)
|
||||||
|
{
|
||||||
|
$row = SqlHelper::ormSelectOne(
|
||||||
|
myself()->_getSelfMysql(),
|
||||||
|
't_bag',
|
||||||
|
array(
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'item_id' => $itemId,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if ($row) {
|
||||||
|
$row['item_uniid'] = $row['idx'];
|
||||||
|
if ($row['account_id'] != myself()->_getAccountId()) {
|
||||||
|
if (!NftService::isEquipOwner(myself()->_getAddress(), $row['token_id'])) {
|
||||||
|
$row = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
33
webapp/models/LuckySymbolRecord.php
Normal file
33
webapp/models/LuckySymbolRecord.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace models;
|
||||||
|
|
||||||
|
require_once('mt/Item.php');
|
||||||
|
|
||||||
|
use mt;
|
||||||
|
use phpcommon\SqlHelper;
|
||||||
|
|
||||||
|
class LuckySymbolRecord extends BaseModel {
|
||||||
|
|
||||||
|
public static function find($itemId)
|
||||||
|
{
|
||||||
|
$row = SqlHelper::ormSelectOne(
|
||||||
|
myself()->_getSelfMysql(),
|
||||||
|
't_bag',
|
||||||
|
array(
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'item_id' => $itemId,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if ($row) {
|
||||||
|
$row['item_uniid'] = $row['idx'];
|
||||||
|
if ($row['account_id'] != myself()->_getAccountId()) {
|
||||||
|
if (!NftService::isEquipOwner(myself()->_getAddress(), $row['token_id'])) {
|
||||||
|
$row = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user