fix
Helius
2022-08-31 ed3b77615ec6b1cce7a3e51516115238be61b4cf
fix
5 files modified
13 ■■■■■ changed files
src/main/java/com/xcong/farmer/cms/configurations/properties/CmsProperties.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
src/main/resources/application-prod.yml 1 ●●●● patch | view | raw | blame | history
src/main/resources/application-test.yml 2 ●●● patch | view | raw | blame | history
src/main/resources/application-xc.yml 1 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/configurations/properties/CmsProperties.java
@@ -10,6 +10,8 @@
@ConfigurationProperties(prefix = "cms")
public class CmsProperties {
    private String downloadPath;
    /**
     * 模板保存地址
     */
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);
    }
}
src/main/resources/application-prod.yml
@@ -109,4 +109,5 @@
  template-path: /home/javaweb/webresource/cms/template
  static-path: /home/javaweb/webresource/cms/static
  output-path: /home/javaweb/webresource/cms/output
  download-path: /home/javaweb/webresource/cms/download
src/main/resources/application-test.yml
@@ -109,4 +109,4 @@
  template-path: /home/javaweb/webresource/cms/template
  static-path: /home/javaweb/webresource/cms/static
  output-path: /home/javaweb/webresource/cms/output
  download-path: /home/javaweb/webresource/cms/static/download
src/main/resources/application-xc.yml
@@ -109,4 +109,5 @@
  template-path: /mnt/webresource/website/static/cms/template
  static-path: /mnt/webresource/website/static/cms/static
  output-path: /mnt/webresource/website/site
  download-path: /mnt/webresource/website/static/cms/static/download