This commit is contained in:
hujiabin 2022-12-06 13:47:28 +08:00
parent c730e061d1
commit b350fbd395

View File

@ -11,6 +11,7 @@ require_once('services/NftService.php');
require_once('services/FormulaService.php');
use mt;
use phpcommon;
use phpcommon\SqlHelper;
use services\NftService;
use services\FormulaService;
@ -105,12 +106,17 @@ class Gun extends BaseModel {
myself()->_getMysql($accountId),
't_gun',
array(
'account_id' => $accountId,
'idx' => $gunUniId,
)
);
if ($row) {
$row['gun_uniid'] = $row['idx'];
if ($row['account_id'] != $accountId) {
$openId = phpcommon\extractOpenId($accountId);
if (!NftService::isEquipOwner($openId, $row['token_id'])) {
$row = null;
}
}
}
return $row;
}