From 9447867d3f1cf4adfad4af9be51795a649eb82be Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 20 Jun 2024 17:27:07 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8D=87=E7=BA=A7=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=88=B02.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/home/RestIndexController.java | 3 ++- core/core-frontend/src/config/axios/service.ts | 11 +---------- pom.xml | 2 +- .../extensions/view/factory/PluginsChartFactory.java | 4 ++++ 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/home/RestIndexController.java b/core/core-backend/src/main/java/io/dataease/home/RestIndexController.java index ce541e1d53..e848d88e9d 100644 --- a/core/core-backend/src/main/java/io/dataease/home/RestIndexController.java +++ b/core/core-backend/src/main/java/io/dataease/home/RestIndexController.java @@ -1,5 +1,6 @@ package io.dataease.home; +import io.dataease.license.utils.LicenseUtil; import io.dataease.utils.ModelUtils; import io.dataease.utils.RsaUtils; import org.springframework.beans.factory.annotation.Value; @@ -31,7 +32,7 @@ public class RestIndexController { @GetMapping("/xpackModel") @ResponseBody public boolean xpackModel() { - return xpackFrontDistributed; + return xpackFrontDistributed && LicenseUtil.licenseValid(); } } diff --git a/core/core-frontend/src/config/axios/service.ts b/core/core-frontend/src/config/axios/service.ts index 3e9931eab1..1f710c179c 100644 --- a/core/core-frontend/src/config/axios/service.ts +++ b/core/core-frontend/src/config/axios/service.ts @@ -271,18 +271,9 @@ const executeVersionHandler = (response: AxiosResponse) => { return } if (executeVersion && executeVersion !== cacheVal) { + wsCache.clear() wsCache.set(key, executeVersion) showMsg('系统有升级,请点击刷新页面', '-sys-upgrade-') - /* ElMessageBox.confirm('系统有升级,请点击刷新页面', { - confirmButtonType: 'primary', - type: 'warning', - confirmButtonText: '刷新', - cancelButtonText: '取消', - autofocus: false, - showClose: false - }).then(() => { - window.location.reload() - }) */ } } export { service, cancelMap } diff --git a/pom.xml b/pom.xml index 704ad851fd..bb9b630fa1 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ - 2.7.0 + 2.8.0 21 UTF-8 2023.0.1.0 diff --git a/sdk/extensions/extensions-view/src/main/java/io/dataease/extensions/view/factory/PluginsChartFactory.java b/sdk/extensions/extensions-view/src/main/java/io/dataease/extensions/view/factory/PluginsChartFactory.java index b25f4562c6..3cb1f98d9b 100644 --- a/sdk/extensions/extensions-view/src/main/java/io/dataease/extensions/view/factory/PluginsChartFactory.java +++ b/sdk/extensions/extensions-view/src/main/java/io/dataease/extensions/view/factory/PluginsChartFactory.java @@ -3,6 +3,7 @@ package io.dataease.extensions.view.factory; import io.dataease.exception.DEException; import io.dataease.extensions.view.template.PluginsChartTemplate; import io.dataease.extensions.view.vo.XpackPluginsViewVO; +import io.dataease.license.utils.LicenseUtil; import io.dataease.license.utils.LogUtil; import io.dataease.plugins.factory.DataEasePluginFactory; @@ -16,11 +17,13 @@ public class PluginsChartFactory { public static PluginsChartTemplate getInstance(String render, String type) { + if (!LicenseUtil.licenseValid()) DEException.throwException("插件功能只对企业版本可用!"); String key = render + "_" + type; return templateMap.get(key); } public static void loadTemplate(String render, String type, PluginsChartTemplate template) { + if (!LicenseUtil.licenseValid()) DEException.throwException("插件功能只对企业版本可用!"); String key = render + "_" + type; if (templateMap.containsKey(key)) return; templateMap.put(key, template); @@ -34,6 +37,7 @@ public class PluginsChartFactory { } public static List getViewConfigList() { + if (!LicenseUtil.licenseValid()) DEException.throwException("插件功能只对企业版本可用!"); return templateMap.values().stream().map(PluginsChartTemplate::getConfig).toList(); } }