aozhiwei aea511335b 1
2023-06-13 15:19:04 +08:00

36 lines
720 B
JavaScript

const utils = require('j7/utils');
const BaseModel = require('./basemodel');
class Log extends BaseModel {
async add(params) {
const result = {
err: null,
seqId: 0
};
const nowTime = utils.getUtcTime();
const fields = [
['type', params['type']],
['subType', params['sub_type']],
['net_id', params['net_id']],
['createtime', nowTime],
['modifytime', nowTime],
];
for (i = 1; i <= 4; ++i) {
const key = 'param' + i;
if (utils.hasKey(params, key)) {
fields.push([key, params[key]]);
}
}
await this.getSession().marketConn
(
'insert',
't_log',
fields
);
}
}
module.exports = Log;