From 8c040b312b3492e6a17311321b73d3eab30d34a6 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 29 Feb 2024 18:09:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(X-Pack):=20=E7=A4=BE=E5=8C=BA=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/system/manage/SysParameterManage.java | 5 +++++ .../java/io/dataease/system/server/SysParameterServer.java | 6 +++++- core/core-frontend/src/api/login.ts | 2 +- de-xpack | 2 +- .../main/java/io/dataease/api/system/SysParameterApi.java | 5 +++++ .../java/io/dataease/constant/XpackSettingConstants.java | 2 ++ .../src/main/java/io/dataease/utils/SystemSettingUtils.java | 5 ++++- .../src/main/java/io/dataease/utils/WhitelistUtils.java | 2 +- 8 files changed, 24 insertions(+), 5 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/system/manage/SysParameterManage.java b/core/core-backend/src/main/java/io/dataease/system/manage/SysParameterManage.java index 063757433e..5a16f71f4e 100644 --- a/core/core-backend/src/main/java/io/dataease/system/manage/SysParameterManage.java +++ b/core/core-backend/src/main/java/io/dataease/system/manage/SysParameterManage.java @@ -91,6 +91,11 @@ public class SysParameterManage { return sysSettings.stream().sorted(Comparator.comparing(CoreSysSetting::getSort)).map(item -> BeanUtils.copyBean(new SettingItemVO(), item)).toList(); } + @XpackInteract(value = "perSetting", replace = true) + public List getUiList() { + return null; + } + @Transactional public void saveGroup(List vos, String groupKey) { diff --git a/core/core-backend/src/main/java/io/dataease/system/server/SysParameterServer.java b/core/core-backend/src/main/java/io/dataease/system/server/SysParameterServer.java index f1a2cd8450..599160ffbe 100644 --- a/core/core-backend/src/main/java/io/dataease/system/server/SysParameterServer.java +++ b/core/core-backend/src/main/java/io/dataease/system/server/SysParameterServer.java @@ -8,7 +8,6 @@ import io.dataease.system.dao.auto.entity.CoreSysSetting; import io.dataease.system.manage.SysParameterManage; import jakarta.annotation.Resource; import org.apache.commons.lang3.StringUtils; -import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -61,4 +60,9 @@ public class SysParameterServer implements SysParameterApi { } return frontTimeOut; } + + @Override + public List ui() { + return sysParameterManage.getUiList(); + } } diff --git a/core/core-frontend/src/api/login.ts b/core/core-frontend/src/api/login.ts index 462a45cd8b..9348d2fb2c 100644 --- a/core/core-frontend/src/api/login.ts +++ b/core/core-frontend/src/api/login.ts @@ -12,4 +12,4 @@ export const logoutApi = () => request.get({ url: '/logout' }) export const refreshApi = () => request.get({ url: '/login/refresh' }) -export const uiLoadApi = () => request.get({ url: '/appearance/query' }) +export const uiLoadApi = () => request.get({ url: '/sysParameter/ui' }) diff --git a/de-xpack b/de-xpack index a1c4b52372..124e721b41 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit a1c4b52372679fde98c2635264ef0b48ac64a50f +Subproject commit 124e721b41f42cd3c60673037ca3894938dfcc0a diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/system/SysParameterApi.java b/sdk/api/api-base/src/main/java/io/dataease/api/system/SysParameterApi.java index 528278ffa0..a5099c5733 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/system/SysParameterApi.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/system/SysParameterApi.java @@ -3,6 +3,7 @@ package io.dataease.api.system; import com.github.xiaoymin.knife4j.annotations.ApiSupport; import io.dataease.api.system.request.OnlineMapEditor; import io.dataease.api.system.vo.SettingItemVO; +import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; @@ -43,4 +44,8 @@ public interface SysParameterApi { @GetMapping("/requestTimeOut") public Integer RequestTimeOut(); + @Hidden + @GetMapping("/ui") + List ui(); + } diff --git a/sdk/common/src/main/java/io/dataease/constant/XpackSettingConstants.java b/sdk/common/src/main/java/io/dataease/constant/XpackSettingConstants.java index dc99d7a94a..bae89ab159 100644 --- a/sdk/common/src/main/java/io/dataease/constant/XpackSettingConstants.java +++ b/sdk/common/src/main/java/io/dataease/constant/XpackSettingConstants.java @@ -5,4 +5,6 @@ public class XpackSettingConstants { public static final String AUTO_CREATE_USER = "basic.autoCreateUser"; public static final String LOG_LIVE_TIME = "basic.logLiveTime"; public static final String Front_Time_Out = "basic.frontTimeOut"; + public static final String PLATFORM_OID = "basic.platformOid"; + public static final String PLATFORM_RID = "basic.platformRid"; } diff --git a/sdk/common/src/main/java/io/dataease/utils/SystemSettingUtils.java b/sdk/common/src/main/java/io/dataease/utils/SystemSettingUtils.java index 9c9f699d90..74d3002f1f 100644 --- a/sdk/common/src/main/java/io/dataease/utils/SystemSettingUtils.java +++ b/sdk/common/src/main/java/io/dataease/utils/SystemSettingUtils.java @@ -8,7 +8,10 @@ public class SystemSettingUtils { public static boolean xpackSetting(String pkey) { - List xpackSettingList = List.of(XpackSettingConstants.AUTO_CREATE_USER, XpackSettingConstants.LOG_LIVE_TIME); + List xpackSettingList = List.of(XpackSettingConstants.AUTO_CREATE_USER, + XpackSettingConstants.LOG_LIVE_TIME, + XpackSettingConstants.PLATFORM_OID, + XpackSettingConstants.PLATFORM_RID); return xpackSettingList.contains(pkey); } } diff --git a/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java b/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java index 8c71a2161d..6c84d72b3b 100644 --- a/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java +++ b/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java @@ -39,7 +39,7 @@ public class WhitelistUtils { "/wecom/token", "/sysParameter/requestTimeOut", "/setting/authentication/status", - "/appearance/query", + "/sysParameter/ui", "/"); public static boolean match(String requestURI) {