Merge pull request 'feat: refs #6449 add summaryId' (#4) from 6449-summaryId into master
gitea/mylogger/pipeline/head This commit looks good
Details
gitea/mylogger/pipeline/head This commit looks good
Details
Reviewed-on: #4
This commit is contained in:
commit
19bcd267c0
|
@ -23,6 +23,7 @@ logs:
|
|||
- itemTag
|
||||
- name: item
|
||||
showField: name
|
||||
showId: id
|
||||
logFields:
|
||||
- size
|
||||
exclude:
|
||||
|
|
12
mylogger.js
12
mylogger.js
|
@ -80,7 +80,8 @@ module.exports = class MyLogger {
|
|||
oldInstance = ?,
|
||||
newInstance = ?,
|
||||
changedModelId = ?,
|
||||
changedModelValue = ?`
|
||||
changedModelValue = ?,
|
||||
summaryId = ?`
|
||||
);
|
||||
logInfo.fetchStmt = await db.prepare(
|
||||
`SELECT id FROM ${sqlTable}
|
||||
|
@ -95,7 +96,8 @@ module.exports = class MyLogger {
|
|||
SET originFk = ?,
|
||||
creationDate = ?,
|
||||
oldInstance = ?,
|
||||
changedModelValue = ?
|
||||
changedModelValue = ?,
|
||||
summaryId = ?
|
||||
WHERE id = ?`
|
||||
);
|
||||
}
|
||||
|
@ -512,7 +514,7 @@ module.exports = class MyLogger {
|
|||
oldI = change.instance;
|
||||
break;
|
||||
}
|
||||
|
||||
const summaryId = row[tableInfo.conf.showId];
|
||||
const modelId = row[tableInfo.idName];
|
||||
const modelValue = change.modelValue ?? null;
|
||||
const oldInstance = oldI ? JSON.stringify(oldI) : null;
|
||||
|
@ -538,6 +540,7 @@ module.exports = class MyLogger {
|
|||
created,
|
||||
oldInstance,
|
||||
modelValue,
|
||||
summaryId,
|
||||
deleteRow.id
|
||||
]);
|
||||
}
|
||||
|
@ -553,7 +556,8 @@ module.exports = class MyLogger {
|
|||
oldInstance,
|
||||
newI ? JSON.stringify(newI) : null,
|
||||
modelId,
|
||||
modelValue
|
||||
modelValue,
|
||||
summaryId
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue