From cf68ee0531ebadbc7b27b8e6e56b9f3c4e893e05 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Tue, 09 Jan 2024 16:25:21 +0800
Subject: [PATCH] 首页菜单的首页二字改成英文的Main
---
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java b/src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java
index f08dbff..df4c3b5 100644
--- a/src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java
+++ b/src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java
@@ -90,6 +90,7 @@
return;
}
+ FileUtil.touch(new File(staticPath + "/empty.txt"));
for (File templateFile : files) {
if (!templateFile.isFile()) {
FileUtil.move(templateFile, new File(staticPath), true);
@@ -251,10 +252,11 @@
String templatePath = FileUtils.path(cmsProperties.getTemplatePath(), company.getCode());
String staticPath = FileUtils.path(cmsProperties.getStaticPath(), company.getCode());
+ String downloadPath = FileUtils.path(cmsProperties.getDownloadPath(), company.getCode());
String fileName = "template.zip";
- ZipUtil.zip(templatePath, staticPath + "/template.zip", true);
-
- return Result.ok("success", cmsProperties.getStaticUrl() + fileName);
+ ZipUtil.zip(FileUtil.file(downloadPath + "/template.zip"), true, FileUtil.file(templatePath), FileUtil.file(staticPath));
+ String url = cmsProperties.getStaticUrl() + "download/" + company.getCode();
+ return Result.ok("success", url +"/" + fileName);
}
}
--
Gitblit v1.9.1