🐛 REPORT:支持 SaaS 租户模式

This commit is contained in:
YunaiV 2023-12-30 10:48:52 +08:00
parent 479062e599
commit ecd7f894c1
4 changed files with 24 additions and 3 deletions

View File

@ -78,7 +78,7 @@
<aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version>
<tencentcloud-sdk-java.version>3.1.853</tencentcloud-sdk-java.version>
<justauth.version>2.0.5</justauth.version>
<jimureport.version>1.6.1</jimureport.version>
<jimureport.version>1.6.6-beta2</jimureport.version>
<xercesImpl.version>2.12.2</xercesImpl.version>
<weixin-java.version>4.5.7.B</weixin-java.version>
</properties>
@ -676,7 +676,7 @@
<!-- 积木报表-->
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId>
<artifactId>jimureport-spring-boot3-starter</artifactId>
<version>${jimureport.version}</version>
<exclusions>
<exclusion>

View File

@ -115,7 +115,7 @@
<!-- 积木报表-->
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId>
<artifactId>jimureport-spring-boot3-starter</artifactId>
</dependency>
<!-- 单独依赖升级版本解决低版本validator失败问题 -->
<dependency>

View File

@ -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());
}
}

View File

@ -76,6 +76,11 @@ spring:
--- #################### 定时任务相关配置 ####################
# 积木报表配置
jeecg:
jmreport:
saas-mode: tenant
--- #################### 芋道相关配置 ####################
yudao: