0"; $whereKv =array( 'owner_address' => myself()->_getOpenId(), ); $fragmentNft = myself()->_getMarketMysql()->execQuery($sql,$whereKv); return $fragmentNft; } public static function ToDto($row){ $dto = array( // 'owner_address' => $row['owner_address'], 'token_id' => $row['token_id'], 'item_id' => $row['token_id'], 'balance' => $row['balance'], 'createtime' => $row['createtime'], 'modifytime' => $row['modifytime'], ); $nft_address = ''; if ($row['token_id']){ $nft_address = SERVER_ENV == _ONLINE ? '0xFc21A863bFb4E4534B246078772e2074e076f0a7' : '0x0E696947A06550DEf604e82C26fd9E493e576337'; } $dto['nft_address'] = $nft_address; $dto['name'] = mt\Item::get($row['token_id'])?mt\Item::get($row['token_id'])['name']:'XXX'; return $dto; } public static function oldToDto($row){ $itemMeta = mt\Item::get($row['token_id']); $dto = array(); if ($itemMeta){ $dto = array( 'token_id' => $row['token_id'], 'item_id' => $row['token_id'], 'type' => $itemMeta['sub_type'], 'parts' => substr($itemMeta['id'],-2,1), 'balance' => $row['balance'], 'createtime' => $row['createtime'], 'modifytime' => $row['modifytime'], ); } return $dto; } }