添加事件分析失败

This commit is contained in:
zhishi 2026-03-23 21:05:40 +08:00
parent 4decb7a7c7
commit 16ca5ffca3
3 changed files with 11 additions and 11 deletions

View File

@ -37,11 +37,10 @@ export default router.post(
const chapterAllList = await u.db("o_novel").where("projectId", projectId).whereIn("id", totalNovelId);
const novelClass = new u.cleanNovel();
novelClass.emitter.on("item", async (item) => {
if (item.event)
await u
.db("o_novel")
.where("id", item.id)
.update({ event: item.event, eventState: item.event ? 1 : -1 });
await u
.db("o_novel")
.where("id", item.id)
.update({ event: item.event, eventState: item.event ? 1 : -1 });
});
novelClass.start(chapterAllList, projectId);

View File

@ -23,11 +23,10 @@ export default router.post(
await u.db("o_novel").where("projectId", projectId).update({ eventState: 0, event: null });
novel.emitter.on("item", async (item) => {
if (item.event)
await u
.db("o_novel")
.where("id", item.id)
.update({ event: item.event, eventState: item.event ? 1 : -1 });
await u
.db("o_novel")
.where("id", item.id)
.update({ event: item.event, eventState: item.event ? 1 : -1 });
});
novel.start(allChapters, projectId);

View File

@ -1,4 +1,4 @@
// @db-hash 56071dcf512e84c37ffd555806af7162
// @db-hash 3cdc2f747dac456ddd4bbfd877efe991
//该文件由脚本自动生成,请勿手动修改
export interface memories {
@ -79,6 +79,8 @@ export interface o_novel {
'chapterData'?: string | null;
'chapterIndex'?: number | null;
'createTime'?: number | null;
'event'?: string | null;
'eventState'?: number | null;
'id'?: number;
'projectId'?: number | null;
'reel'?: string | null;