diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index e949942a..251c31b9 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -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; }