From 8c42f639baffbec9a223b6e64bc12b7132e3910d Mon Sep 17 00:00:00 2001 From: zhaoyingbo Date: Thu, 19 Dec 2024 07:24:48 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E8=81=8A=E5=A4=A9ID?= =?UTF-8?q?=E5=92=8C=E7=94=A8=E6=88=B7ID=E7=9A=84=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/groupAgent/report.ts | 2 +- db/user/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controller/groupAgent/report.ts b/controller/groupAgent/report.ts index 37a7ff9..707bea5 100644 --- a/controller/groupAgent/report.ts +++ b/controller/groupAgent/report.ts @@ -90,7 +90,7 @@ const genReport = async ( }) } catch (error: any) { logger.error( - `Failed to summarize chat ${subscription.chat_id}: ${error.message}` + `Failed to summarize chat ${subscription.chatId}: ${error.message}` ) } } diff --git a/db/user/index.ts b/db/user/index.ts index 48106ca..8e08470 100644 --- a/db/user/index.ts +++ b/db/user/index.ts @@ -34,7 +34,7 @@ const create = async (user: User) => */ const getByUserId = async (userId: string) => managePbError(() => - pbClient.collection("user").getFirstListItem(`user_id = "${userId}"`) + pbClient.collection("user").getFirstListItem(`userId = "${userId}"`) ) /** @@ -49,7 +49,7 @@ const getByCtx = async ({ larkBody, larkService }: Context) => { if (user) return user // 如果数据库中没有用户信息,从larkService获取用户信息 const userInfo = await larkService.user.getOne(larkBody.userId, "user_id") - if (userInfo.code !== 0) return null + if (userInfo.code === 0) return null // 解构用户信息 const { user_id,