This commit is contained in:
aozhiwei 2023-07-09 14:08:30 +08:00
parent 396b172d11
commit aa8c7e960b

View File

@ -100,9 +100,9 @@ class Activate721Nft extends BaseEventProcess {
} }
async updateGameDbInfo(transId, itemUniId, itemId, tokenId, tokenType) { async updateGameDbInfo(transId, itemUniId, itemId, tokenId, tokenType) {
const {err, conn} = await app.getDbConn(constant.GAMEDB_NAME); const {err, gameDbConn} = await app.getDbConn(constant.GAMEDB_NAME);
if (err) { if (err) {
this.throwError(instance, 'gamedb connection err:' + err); this.throwError('gamedb connection err:' + err);
return; return;
} }
try { try {
@ -130,10 +130,10 @@ class Activate721Nft extends BaseEventProcess {
break; break;
} }
if (!tblName) { if (!tblName) {
this.throwError(instance, 'error token_type:' + tokenType); this.throwError('error token_type:' + tokenType);
return; return;
} }
await this.conn.update( await gameDbConn.update(
tblName, tblName,
[ [
['idx', itemUniId], ['idx', itemUniId],
@ -146,10 +146,10 @@ class Activate721Nft extends BaseEventProcess {
] ]
); );
} finally { } finally {
this.conn.release(); gameDbConn.release();
} }
} catch (e) { } catch (e) {
this.throwError(instance, 'updateGameDbInfo err:' + e); this.throwError('updateGameDbInfo err:' + e);
return; return;
} }
} }