From ed3b77615ec6b1cce7a3e51516115238be61b4cf Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 31 Aug 2022 10:26:46 +0800 Subject: [PATCH] fix --- src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java | 7 ++++--- 1 files changed, 4 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 71c2ee3..23e9100 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 @@ -251,10 +251,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(FileUtil.file(staticPath + "/template.zip"), true, FileUtil.file(templatePath), FileUtil.file(staticPath)); - - return Result.ok("success", cmsProperties.getStaticUrl() + company.getCode() + "/" + 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