From 09de0bcc5ce328d7bcb76e30058c340879c11041 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 13 Sep 2023 15:35:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8F=92=E4=BB=B6):=20=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=8F=92=E4=BB=B6=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/ext/ExtSysPluginMapper.java | 2 ++ .../src/main/java/io/dataease/ext/ExtSysPluginMapper.xml | 4 +++- .../main/java/io/dataease/plugins/config/PluginRunner.java | 1 + .../src/main/java/io/dataease/service/sys/PluginService.java | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/backend/src/main/java/io/dataease/ext/ExtSysPluginMapper.java b/core/backend/src/main/java/io/dataease/ext/ExtSysPluginMapper.java index b1f988e2cb..9144dcdeeb 100644 --- a/core/backend/src/main/java/io/dataease/ext/ExtSysPluginMapper.java +++ b/core/backend/src/main/java/io/dataease/ext/ExtSysPluginMapper.java @@ -8,4 +8,6 @@ import java.util.List; public interface ExtSysPluginMapper { List query(KeywordRequest request); + + int updateVersion(String version); } diff --git a/core/backend/src/main/java/io/dataease/ext/ExtSysPluginMapper.xml b/core/backend/src/main/java/io/dataease/ext/ExtSysPluginMapper.xml index b1a64c027e..7ab844b177 100644 --- a/core/backend/src/main/java/io/dataease/ext/ExtSysPluginMapper.xml +++ b/core/backend/src/main/java/io/dataease/ext/ExtSysPluginMapper.xml @@ -13,7 +13,9 @@ - + + update my_plugin set version = #{version} where store = 'default' + diff --git a/core/backend/src/main/java/io/dataease/plugins/config/PluginRunner.java b/core/backend/src/main/java/io/dataease/plugins/config/PluginRunner.java index 55eec47740..e43c1760d1 100644 --- a/core/backend/src/main/java/io/dataease/plugins/config/PluginRunner.java +++ b/core/backend/src/main/java/io/dataease/plugins/config/PluginRunner.java @@ -40,6 +40,7 @@ public class PluginRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { // 执行加载插件逻辑 + pluginService.systemUpgrade(); KeywordRequest request = new KeywordRequest(); List plugins = pluginService.query(request); if (CollectionUtils.isEmpty(plugins)) return; diff --git a/core/backend/src/main/java/io/dataease/service/sys/PluginService.java b/core/backend/src/main/java/io/dataease/service/sys/PluginService.java index a27d41eef5..9df89c03dc 100644 --- a/core/backend/src/main/java/io/dataease/service/sys/PluginService.java +++ b/core/backend/src/main/java/io/dataease/service/sys/PluginService.java @@ -68,6 +68,10 @@ public class PluginService { return extSysPluginMapper.query(request); } + public void systemUpgrade() { + extSysPluginMapper.updateVersion(version); + } + /** * 从本地安装处插件 *