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'); require_once('services/FormulaService.php');
use mt; use mt;
use phpcommon;
use phpcommon\SqlHelper; use phpcommon\SqlHelper;
use services\NftService; use services\NftService;
use services\FormulaService; use services\FormulaService;
@ -105,12 +106,17 @@ class Gun extends BaseModel {
myself()->_getMysql($accountId), myself()->_getMysql($accountId),
't_gun', 't_gun',
array( array(
'account_id' => $accountId,
'idx' => $gunUniId, 'idx' => $gunUniId,
) )
); );
if ($row) { if ($row) {
$row['gun_uniid'] = $row['idx']; $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; return $row;
} }