From 8fa1e083b38c7a15ef4f16489acd2c723421457f Mon Sep 17 00:00:00 2001 From: chenfang Date: Fri, 27 Oct 2023 11:42:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=B8=8B=E8=BD=BD=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=95=B0=E6=8D=AEexcelURl=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/win/framework/excel/core/util/ExcelUtils.java | 2 +- .../src/main/java/com/win/framework/web/constant/Constant.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/win-framework/win-spring-boot-starter-excel/src/main/java/com/win/framework/excel/core/util/ExcelUtils.java b/win-framework/win-spring-boot-starter-excel/src/main/java/com/win/framework/excel/core/util/ExcelUtils.java index 0636d3d2..5ff31c4a 100644 --- a/win-framework/win-spring-boot-starter-excel/src/main/java/com/win/framework/excel/core/util/ExcelUtils.java +++ b/win-framework/win-spring-boot-starter-excel/src/main/java/com/win/framework/excel/core/util/ExcelUtils.java @@ -102,7 +102,7 @@ public class ExcelUtils { */ public static String writeLocalFile(String fileName, String sheetName, List dataList) throws FileNotFoundException { WebProperties webProperties = SpringUtil.getBean(WebProperties.class); - fileName = fileName + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx"; + fileName = fileName + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")); File file = ResourceUtils.getFile( webProperties.getProfile() + "/" + fileName); EasyExcel.write(file).sheet(sheetName).doWrite(dataList); return Constant.RESOURCE_PREFIX + fileName; diff --git a/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/constant/Constant.java b/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/constant/Constant.java index 6df8ab34..7d2d0390 100644 --- a/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/constant/Constant.java +++ b/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/constant/Constant.java @@ -5,6 +5,6 @@ public class Constant { /** * 资源映射路径 前缀 */ - public static final String RESOURCE_PREFIX = "/profile"; + public static final String RESOURCE_PREFIX = "/profile/"; }