This commit is contained in:
hujiabin 2022-11-03 16:57:08 +08:00
parent a8230c99d9
commit 94919e7ee4

View File

@ -30,25 +30,25 @@ class Chip extends BaseModel
public static function getChipList($cb) public static function getChipList($cb)
{ {
SqlHelper::ormSelect( // SqlHelper::ormSelect(
myself()->_getSelfMysql(), // myself()->_getSelfMysql(),
't_chip', // 't_chip',
array( // array(
'account_id' => myself()->_getAccountId() // 'account_id' => myself()->_getAccountId()
), // ),
function ($row) use($cb) { // function ($row) use($cb) {
$cb($row); // $cb($row);
} // }
); // );
foreach (NftService::getChips(myself()->_getOpenId()) as $nftDb) { // foreach (NftService::getChips(myself()->_getOpenId()) as $nftDb) {
if (! $nftDb['deleted']){ // if (! $nftDb['deleted']){
$row = SqlHelper::ormSelectOne( // $row = SqlHelper::ormSelectOne(
myself()->_getSelfMysql(), // myself()->_getSelfMysql(),
't_chip', // 't_chip',
array( // array(
'token_id' => $nftDb['token_id'], // 'token_id' => $nftDb['token_id'],
) // )
); // );
// if (!$row) { // if (!$row) {
// $itemMeta = mt\Item::get($nftDb['item_id']); // $itemMeta = mt\Item::get($nftDb['item_id']);
// if ($itemMeta) { // if ($itemMeta) {
@ -62,11 +62,11 @@ class Chip extends BaseModel
// ); // );
// } // }
// } // }
if ($row) { // if ($row) {
$cb($row); // $cb($row);
} // }
} // }
} // }
} }
public static function toDto($row) public static function toDto($row)