5 Commits

Author SHA1 Message Date
BGStone
6501f59096 Merge 346db0ab56 into c3c8dcd217 2025-07-09 11:06:32 +08:00
JEECG
c3c8dcd217 🚀 革命性升级!JimuReport 积木报表 v2.1.0 版本震撼发布 2025-07-07 10:27:39 +08:00
JEECG
e1891922a0 🚀 革命性升级!JimuReport 积木报表 v2.1.0 版本震撼发布 2025-07-05 09:27:38 +08:00
JEECG
9ee6935a15 🚀 革命性升级!JimuReport 积木报表 v2.1.0 版本震撼发布 2025-07-05 09:26:19 +08:00
BGStone
346db0ab56 Add files via upload
将原来的 一条记录一条Insert 语句,优化为 批量 Insert. 
优化效果:
(1)建表语句 由 【原:2525条】优化成 【现:99条】。
(2)时间由 【原:3 m 32 s 983 ms】  降低到  【现:28 s 705 ms】.
2023-12-30 18:51:44 +08:00
10 changed files with 3354 additions and 41 deletions

View File

@@ -1,10 +1,10 @@
# JimuReport积木报表(免费报表工具)
v2.0.0 | 2025-06-09
v2.1.0 | 2025-07-07
[![](https://img.shields.io/badge/Author-北京敲敲云科技-orange.svg)](https://qiaoqiaoyun.com/aboutUs)
[![](https://img.shields.io/badge/version-2.0.0-brightgreen.svg)](https://github.com/jeecgboot/JimuReport)
[![](https://img.shields.io/badge/version-2.1.0-brightgreen.svg)](https://github.com/jeecgboot/JimuReport)
[![](https://img.shields.io/badge/Blog-积木报表官网-blue.svg)](http://jimureport.com)
[![GitHub stars](https://img.shields.io/github/stars/zhangdaiscott/JimuReport.svg?style=social&label=Stars)](https://github.com/jeecgboot/JimuReport)
[![GitHub forks](https://img.shields.io/github/forks/zhangdaiscott/JimuReport.svg?style=social&label=Fork)](https://github.com/jeecgboot/JimuReport)
@@ -51,12 +51,19 @@ v2.0.0 | 2025-06-09
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>
</dependency>
<!-- mongo、redis和文件数据集支持包按需引入 -->
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-nosql-starter</artifactId>
<version>1.9.5.2</version>
<version>2.0.0</version>
</dependency>
<!-- 后台导出接口Echart图表支持包按需引入 -->
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-echarts-starter</artifactId>
<version>2.1.0</version>
</dependency>
```
@@ -71,7 +78,7 @@ v2.0.0 | 2025-06-09
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-nosql-starter</artifactId>
<version>1.9.5.2</version>
<version>2.0.0</version>
</dependency>
```

View File

@@ -10,6 +10,6 @@ WORKDIR /jimureport
EXPOSE 8085
ADD ./target/jimureport-example-2.0.jar ./
ADD ./target/jimureport-example-2.1.jar ./
CMD java -DMYSQL-HOST=jimureport-mysql -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jimureport-example-2.0.jar
CMD java -DMYSQL-HOST=jimureport-mysql -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jimureport-example-2.1.jar

File diff suppressed because one or more lines are too long

View File

@@ -12,7 +12,7 @@
<name>jimureport-example</name>
<groupId>org.jeecg</groupId>
<artifactId>jimureport-example</artifactId>
<version>2.0</version>
<version>2.1</version>
<url>http://www.jimureport.com</url>
<description>积木报表集成示例</description>
@@ -65,13 +65,19 @@
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId>
<version>2.0.0.1</version>
<version>2.1.0</version>
</dependency>
<!-- 积木报表扩展包 csv excel json mogodb redis数据集支持 -->
<!-- mongo、redis和文件数据集支持包,按需引入 -->
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-nosql-starter</artifactId>
<version>1.9.5.2</version>
<version>2.0.0</version>
</dependency>
<!-- 后台导出接口Echart图表支持包按需引入 -->
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-echarts-starter</artifactId>
<version>2.1.0</version>
</dependency>
<!-- 积木BI大屏 -->
<dependency>

View File

@@ -11,14 +11,19 @@ import org.springframework.core.env.Environment;
* 积木报表独立服务启动类
*/
@SpringBootApplication(scanBasePackages = {"org.jeecg", "com.jeecg"})
@EnableAutoConfiguration(exclude = {MongoAutoConfiguration.class})
@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
public class JimuReportApplication {
public static void main(String[] args) {
ConfigurableApplicationContext application = SpringApplication.run(JimuReportApplication.class, args);
Environment env = application.getEnvironment();
String port = env.getProperty("server.port");
String path = env.containsProperty("server.servlet.context-path") ? env.getProperty("server.servlet.context-path") : "";
String path = env.containsProperty("server.servlet.context-path")?env.getProperty("server.servlet.context-path"):"";
String currentEncoding = System.getProperty("file.encoding", "UTF-8");
if(!currentEncoding.equalsIgnoreCase("UTF-8")){
// 默认编码不是UTF-8设置为UTF-8
System.setProperty("file.encoding", "UTF-8");
}
System.out.println("\n----------------------------------------------------------\n\t" +
"JimuReport 积木报表平台 is running! Access URL:\n\t" +
"报表工作台: \t\thttp://localhost:" + port + path + "/jmreport/list\n\t" +

View File

@@ -21,9 +21,9 @@ public class ApiSecurityConfigFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
String loginFrom = req.getHeader("jm_login_from");
if(OkConvertUtils.isNotEmpty(loginFrom)){
if(null != loginFrom && !loginFrom.isEmpty()){
String springSecurityContext = req.getHeader("jm_spring_security_context");
if(OkConvertUtils.isNotEmpty(springSecurityContext)){
if(null != springSecurityContext && !springSecurityContext.isEmpty()){
SecurityContextImpl securityContext = JSONObject.parseObject(springSecurityContext, SecurityContextImpl.class);
HttpSession session = req.getSession();
session.setAttribute("loginFrom", loginFrom);

View File

@@ -1,13 +1,17 @@
package com.jeecg.modules.jmreport.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
import org.springframework.security.web.savedrequest.SavedRequest;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
/**
* 自定义springsecurity登录成功处理
@@ -15,6 +19,7 @@ import java.io.IOException;
* @author chenrui
* @date 2024/8/2 16:26
*/
@Slf4j
public class CustomLoginSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler {
@Override
@@ -22,6 +27,27 @@ public class CustomLoginSuccessHandler extends SavedRequestAwareAuthenticationSu
Authentication authentication) throws IOException, ServletException {
HttpSession session = request.getSession();
session.setAttribute("loginFrom", "jimu_example");
super.onAuthenticationSuccess(request, response, authentication);
SavedRequest savedRequest = (SavedRequest) session.getAttribute("SPRING_SECURITY_SAVED_REQUEST");
String redirectUrl = savedRequest != null ? savedRequest.getRedirectUrl() : null;
if (redirectUrl != null) {
try {
URI uri = new URI(redirectUrl);
String path = uri.getPath(); // 提取路径部分
if (path != null && path.startsWith("/jmreport")) {
// 路径符合要求,执行默认跳转
super.onAuthenticationSuccess(request, response, authentication);
return;
}
} catch (URISyntaxException e) {
// URL解析失败打印日志后继续执行默认跳转
log.error(e.getMessage(), e);
}
}
// 不符合 /jmreport 开头,或 redirectUrl 为 null 或异常
response.sendRedirect("/");
}
}

View File

@@ -60,6 +60,7 @@ public class SpringSecurityConfig {
"/jmreport/show",
"/jmreport/form/submit",
"/jmreport/form/repeat/check/**",
"/jmreport/exportReport",
"/jmreport/addViewCount/**").permitAll()
// 仪表盘分享页面
.antMatchers("/jimubi/share/view/**",

View File

@@ -21,7 +21,7 @@ public class ViewPageCustomAccess {
public boolean check(HttpServletRequest request, Authentication authentication) {
Object principal = authentication.getPrincipal();
if (OkConvertUtils.isEmpty(principal) || "anonymousUser".equalsIgnoreCase(principal.toString())) {
if (null == principal || principal.toString().isEmpty() || "anonymousUser".equalsIgnoreCase(principal.toString())) {
// 未登录
if (openViewPage) {
// 配置文件设置了开放view页面
@@ -30,7 +30,8 @@ public class ViewPageCustomAccess {
HttpServletRequest httpRequest = (HttpServletRequest) request;
String previousPage = httpRequest.getParameter("previousPage");
String jmLink = httpRequest.getParameter("jmLink");
if (OkConvertUtils.isNotEmpty(previousPage) && OkConvertUtils.isNotEmpty(jmLink) ) {
if (null != previousPage && !previousPage.isEmpty()
&& null != jmLink && !jmLink.isEmpty()) {
// 参数中有previousPage和jmLink
return true;
}

View File

@@ -1,8 +1,12 @@
package com.jeecg.modules.jmreport.extend;
import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
import org.jeecg.modules.jmreport.common.constant.JmConst;
import org.jeecg.modules.jmreport.common.util.JimuSpringContextUtils;
import org.jeecg.modules.jmreport.common.util.OkConvertUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
/**
@@ -20,31 +24,11 @@ public class JimuReportTokenServiceImpl implements JmReportTokenServiceI {
*/
@Override
public String getToken(HttpServletRequest request) {
//System.out.println("---------call---------getToken-----------------------");
//System.out.println("---------call---------getToken-----------------------");
//return TokenUtils.getTokenByRequest(request);
return "123456";
}
/**
* 自定义获取租户
*
* @return
*/
@Override
public String getTenantId() {
// String headerTenantId = null;
// HttpServletRequest request = JimuSpringContextUtils.getHttpServletRequest();
// if (request != null) {
// headerTenantId = request.getHeader(JmConst.HEADER_TENANT_ID);
// if(OkConvertUtils.isEmpty(headerTenantId)){
// headerTenantId = request.getParameter(JmConst.TENANT_ID);
// }
// }
// return headerTenantId;
return "1";
}
/**
* 通过Token获取登录人用户名
* @param token
@@ -58,7 +42,7 @@ public class JimuReportTokenServiceImpl implements JmReportTokenServiceI {
/**
* 自定义用户拥有的角色
*
*
* @param token
* @return
*/
@@ -83,7 +67,7 @@ public class JimuReportTokenServiceImpl implements JmReportTokenServiceI {
//drag:design:getTotalData 仪表盘对Online表单展示数据
return new String[]{"drag:datasource:testConnection","onl:drag:clear:recovery","drag:analysis:sql","drag:design:getTotalData"};
}
/**
* Token校验
* @param token
@@ -107,4 +91,26 @@ public class JimuReportTokenServiceImpl implements JmReportTokenServiceI {
header.add("token", "token value 2");
return header;
}
/**
* 自定义获取租户
*
* @return
*/
@Override
public String getTenantId() {
String headerTenantId = null;
HttpServletRequest request = JimuSpringContextUtils.getHttpServletRequest();
if (request != null) {
headerTenantId = request.getHeader(JmConst.HEADER_TENANT_KEY);
if(OkConvertUtils.isEmpty(headerTenantId)){
headerTenantId = request.getHeader(JmConst.HEADER_TENANT_ID);
}
if(OkConvertUtils.isEmpty(headerTenantId)){
headerTenantId = request.getParameter(JmConst.TENANT_ID);
}
}
//return headerTenantId;
return null;
}
}