From 18c63ba5f9454d0da159731b9e6228cd402ba680 Mon Sep 17 00:00:00 2001 From: cool Date: Fri, 31 May 2024 17:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=92=E4=BB=B6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/plugin/service/info.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/plugin/service/info.ts b/src/modules/plugin/service/info.ts index c1478d6..ded4dad 100644 --- a/src/modules/plugin/service/info.ts +++ b/src/modules/plugin/service/info.ts @@ -60,7 +60,13 @@ export class PluginService extends BaseService { */ async addOrUpdate(param: any, type?: 'add' | 'update') { await super.addOrUpdate(param, type); - const info = await this.pluginInfoEntity.findOneBy({ id: param.id }); + const info = await this.pluginInfoEntity + .createQueryBuilder('a') + .select(['a.id', 'a.keyName', 'a.status', 'a.hook']) + .where({ + id: Equal(param.id), + }) + .getOne(); if (info.status == 1) { await this.reInit(info.keyName); } else {