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