From b9c4976291f20530113eda5526b94d18a5de62d2 Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sun, 17 Aug 2025 00:00:34 +0800 Subject: [PATCH] fix: cannot run due to `QueryFailedError: SQLITE_ERROR: near ")": syntax error` - when one of `jobNotMatchStrategy`/`jobNotActiveStrategy`/`expectCityNotMatchStrategy` set to `MarkAsNotSuitOp.MARK_AS_NOT_SUIT_ON_LOCAL` and `chattedJobIds.length === 0`, application will crash --- packages/sqlite-plugin/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/sqlite-plugin/src/index.ts b/packages/sqlite-plugin/src/index.ts index e4f6959..a3a5e73 100644 --- a/packages/sqlite-plugin/src/index.ts +++ b/packages/sqlite-plugin/src/index.ts @@ -175,6 +175,9 @@ export default class SqlitePlugin { } const last30DayChatStartupRecords = (await getChatStartupRecordsInLastSomeDays(ds, 30)) ?? []; const chattedJobIds = last30DayChatStartupRecords.map(it => it.encryptJobId) + if (chattedJobIds.length === 0) { + return + } const chattedBossIds = ((await getBossIdsByJobIds(ds, chattedJobIds)) ?? []).map(it => it.encryptBossId) for (const id of chattedBossIds) { blockBossNotNewChat.add(id)