chore(plugin-service): 补全内置插件的installed字段赋值逻辑

为内置插件添加默认的installed状态设置,统一插件安装状态的处理逻辑,修复部分场景下插件安装状态不准确的问题
This commit is contained in:
xiaojunnuo
2026-09-03 01:39:22 +08:00
parent 3efa0582ef
commit 7d4311115c
@@ -712,6 +712,7 @@ export class PluginService extends BaseService<PluginEntity> {
if (param.type === "builtIn") {
return await super.add({
disabled: false,
installed: true,
...param,
});
}
@@ -736,6 +737,7 @@ export class PluginService extends BaseService<PluginEntity> {
disabled: false,
...param,
...plugin,
installed: true,
});
await this.registerById(res.id);
@@ -1009,13 +1011,14 @@ export class PluginService extends BaseService<PluginEntity> {
const updateBean: Record<string, any> = {
id: existingRecord.id,
...itemFromStore,
installed: false,
};
await this.updateById(updateBean);
}
continue;
} else {
itemFromStore.disabled = false;
itemFromStore.installed = false;
await this.repository.save(itemFromStore);
}
}