From bd8b9eaf761511ccf0a9e6e4903c80a1d202a960 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Fri, 12 Jul 2024 11:21:15 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE=E5=AD=97=E6=AE=B5=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=99=84=E4=BB=B6=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1199120830660608]后端-增加配置字段控制移动端附件下载 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1199120830660608 --- .../framework/config/FrameworkTenantConfig.java | 3 ++- .../framework/login/handler/TenantController.java | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/neatlogic/framework/config/FrameworkTenantConfig.java b/src/main/java/neatlogic/framework/config/FrameworkTenantConfig.java index fdbb6fc23..2eca27c58 100644 --- a/src/main/java/neatlogic/framework/config/FrameworkTenantConfig.java +++ b/src/main/java/neatlogic/framework/config/FrameworkTenantConfig.java @@ -19,7 +19,8 @@ import neatlogic.framework.util.$; public enum FrameworkTenantConfig implements ITenantConfig{ API_QPS("apiqps", null, "nfc.frameworktenantconfig.apiqps"), - DISABLED_MODULEGROUPLIST("diabled.modulegrouplist", null,"nfc.frameworktenantconfig.disabledmodulegrouplist"); + DISABLED_MODULEGROUPLIST("diabled.modulegrouplist", null,"nfc.frameworktenantconfig.disabledmodulegrouplist"), + ALLOW_MOBILE_DOWNLOAD_FILE("allowMobileDownloadFile", "0","是否允许移动端下载附件"), ; String key; diff --git a/src/main/java/neatlogic/module/framework/login/handler/TenantController.java b/src/main/java/neatlogic/module/framework/login/handler/TenantController.java index aa565e032..6815f93e3 100644 --- a/src/main/java/neatlogic/module/framework/login/handler/TenantController.java +++ b/src/main/java/neatlogic/module/framework/login/handler/TenantController.java @@ -21,7 +21,10 @@ import neatlogic.framework.common.ReturnJson; import neatlogic.framework.common.config.Config; import neatlogic.framework.common.constvalue.ResponseCode; import neatlogic.framework.common.util.TenantUtil; +import neatlogic.framework.config.FrameworkTenantConfig; +import neatlogic.framework.dao.mapper.ConfigMapper; import neatlogic.framework.dao.mapper.ThemeMapper; +import neatlogic.framework.dto.ConfigVo; import neatlogic.framework.dto.TenantVo; import neatlogic.framework.dto.ThemeVo; import neatlogic.framework.filter.core.ILoginAuthHandler; @@ -54,6 +57,8 @@ public class TenantController { private boolean isLoad = false; @Resource private ThemeMapper themeMapper; + @Resource + private ConfigMapper configMapper; private void getCommercialModule() { Reflections reflections = new Reflections("neatlogic"); @@ -116,6 +121,13 @@ public class TenantController { if (StringUtils.isNotEmpty(Config.SSO_TICKET_KEY())) { data.put("ssoTicketKey", Config.SSO_TICKET_KEY()); } + // 是否允许移动端下载附件 + ConfigVo configVo = configMapper.getConfigByKey(FrameworkTenantConfig.ALLOW_MOBILE_DOWNLOAD_FILE.getKey()); + if (configVo != null) { + data.put("allowMobileDownloadFile", configVo.getValue()); + } else { + data.put("allowMobileDownloadFile", FrameworkTenantConfig.ALLOW_MOBILE_DOWNLOAD_FILE.getValue()); + } ReturnJson.success(data, response); } catch (Exception e) { logger.error(e.getMessage(), e); -- Gitee