From ecd7f894c1180a365ca4b1cd96fe667a88ea7617 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 30 Dec 2023 10:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20REPORT=EF=BC=9A=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20SaaS=20=E7=A7=9F=E6=88=B7=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 4 ++-- .../yudao-module-report-biz/pom.xml | 2 +- .../core/service/JmReportTokenServiceImpl.java | 16 ++++++++++++++++ .../src/main/resources/application.yaml | 5 +++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index a20e7f2f1..b061e65ae 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -78,7 +78,7 @@ 2.2.1 3.1.853 2.0.5 - 1.6.1 + 1.6.6-beta2 2.12.2 4.5.7.B @@ -676,7 +676,7 @@ org.jeecgframework.jimureport - jimureport-spring-boot-starter + jimureport-spring-boot3-starter ${jimureport.version} diff --git a/yudao-module-report/yudao-module-report-biz/pom.xml b/yudao-module-report/yudao-module-report-biz/pom.xml index 72562cb99..dcb56dbc7 100644 --- a/yudao-module-report/yudao-module-report-biz/pom.xml +++ b/yudao-module-report/yudao-module-report-biz/pom.xml @@ -115,7 +115,7 @@ org.jeecgframework.jimureport - jimureport-spring-boot-starter + jimureport-spring-boot3-starter diff --git a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java index 565bf0bbf..6e7b4134c 100644 --- a/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java +++ b/yudao-module-report/yudao-module-report-biz/src/main/java/cn/iocoder/yudao/module/report/framework/jmreport/core/service/JmReportTokenServiceImpl.java @@ -128,4 +128,20 @@ public class JmReportTokenServiceImpl implements JmReportTokenServiceI { return user; } + @Override + public String[] getRoles(String s) { + // 暂时不用实现,因为不用 JmReport 的角色 + return null; + } + + @Override + public String getTenantId() { + // 补充说明:不能直接通过 TenantContext 获取,因为 jimu 报表前端请求时,没有带上 tenant-id Header + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + if (loginUser == null) { + return null; + } + return StrUtil.toStringOrNull(loginUser.getTenantId()); + } + } diff --git a/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml b/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml index 1a17926a1..dbc2279a0 100644 --- a/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml +++ b/yudao-module-report/yudao-module-report-biz/src/main/resources/application.yaml @@ -76,6 +76,11 @@ spring: --- #################### 定时任务相关配置 #################### +# 积木报表配置 +jeecg: + jmreport: + saas-mode: tenant + --- #################### 芋道相关配置 #################### yudao: