This commit is contained in:
aozhiwei 2023-07-11 18:49:37 +08:00
parent 550cdee4b4
commit 92612809b1

View File

@ -2,7 +2,6 @@ const log = require('j7/log');
const app = require('j7/app'); const app = require('j7/app');
const bcutils = require('j7/bcutils'); const bcutils = require('j7/bcutils');
const utils = require('j7/utils'); const utils = require('j7/utils');
const j7event = require('j7/event');
const http = require('j7/http'); const http = require('j7/http');
const constant = require('common/constant'); const constant = require('common/constant');
const metaFactory = require('../../../metadata/factory'); const metaFactory = require('../../../metadata/factory');
@ -78,8 +77,8 @@ class BaseEventProcess {
async markOk() { async markOk() {
await this.updateEventDb( await this.updateEventDb(
[ [
['state', constant.EVENTDB_STATE_HANDLED], ['state', constant.EVENTDB_STATE_HANDLED],
['modifytime', utils.getUtcTime()], ['modifytime', utils.getUtcTime()],
] ]
); );
} }
@ -206,7 +205,42 @@ class BaseEventProcess {
} }
async confirmTransactionDb(transId) { async confirmTransactionDb(transId) {
this.throwError('not impl'); {
const nowTime = utils.getUtcTime();
const {err} = await this.gameDbConn
(
'update',
't_transaction_prefee',
[
['trans_id', transId],
],
[
['done', 1],
['modifytime', nowTime],
]
);
if (err) {
this.throwError('confirmTransactionDb t_transaction_prefee error transId:' + transId);
}
}
{
const nowTime = utils.getUtcTime();
const {err} = await this.gameDbConn
(
'update',
't_transaction',
[
['trans_id', transId],
],
[
['status', 3],
['modifytime', nowTime],
]
);
if (err) {
this.throwError('confirmTransactionDb t_transaction_prefee error transId:' + transId);
}
}
} }
} }