Browse Source

卷库下载-bug修改

xiaof 3 năm trước cách đây
mục cha
commit
87a0490846

+ 7 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java

@@ -768,7 +768,13 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
         }
         File zipFile = null;
         try {
-            zipFile = FileUtil.file(SystemConstant.TEMP_FILES_DIR + File.separator + schoolId, time + ".zip");
+            String zipPath = SystemConstant.TEMP_FILES_DIR + File.separator + schoolId;
+            File zipPathFile = new File(zipPath);
+            if(!zipPathFile.exists()){
+                zipPathFile.mkdirs();
+            }
+            zipFile = FileUtil.file(zipPath, time + ".zip");
+
             // 压缩文件
             if (!zipFile.exists()) {
                 zipFile.createNewFile();