Explorar o código

:bug: 修复压缩文件夹是相对路径时压缩失败的问题

Twelve615 hai 1 ano
pai
achega
dd7aaec2de

+ 7 - 1
airport/jeecg-boot-module-system/src/main/java/org/jeecg/modules/admin_order/service/impl/AdminOrderServiceImpl.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.admin_order.service.impl;
 
+import cn.hutool.core.exceptions.UtilException;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.thread.ThreadUtil;
 import cn.hutool.core.util.ZipUtil;
@@ -272,7 +273,12 @@ public class AdminOrderServiceImpl extends ServiceImpl<AdminOrderMapper, AdminOr
         // 生成zip文件中的内容
         List<String> genFileNameList = generatePdfFileByOrderList(orderIdList, outputFolder);
         // 生成zip文件
-        File zip = ZipUtil.zip(outputFolder);
+        File zip = null;
+        try {
+            zip = ZipUtil.zip(outputFolder);
+        } catch (UtilException e) {
+            throw new RuntimeException(e);
+        }
         adminFileExport.setFileNum(genFileNameList.size());
         adminFileExport.setFileSize(zip.length());
         adminFileExport.setUrl(systemHost + "/sys/common/static/tempFile/" + adminFileExport.getName());

+ 3 - 3
airport/jeecg-boot-module-system/src/main/resources/application-prod.yml

@@ -267,11 +267,11 @@ jeecg:
   uploadType: local
   path:
     #文件上传根目录 设置
-    upload: ./AJeecgBootFiles
+    upload: /www/wwwroot/airport/AJeecgBootFiles
     temp: /tempFile
     #    upload: D:\\AJeecgBootFiles
     #webapp文件路径
-    webapp: ./AJeecgBootFiles
+    webapp: /www/wwwroot/airport/AJeecgBootFiles
   #    webapp: D:\\AJeecgBootFiles
   shiro:
     excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
@@ -405,4 +405,4 @@ third-app:
       client-id: ??
       # appSecret
       client-secret: ??
-      agent-id: ??
+      agent-id: ??