瀏覽代碼

v3场景下载

dengsixing 2 年之前
父節點
當前提交
623d4886d0

+ 4 - 3
src/main/java/com/fdkankan/download/service/impl/SceneDownloadHandlerServiceImpl.java

@@ -7,6 +7,7 @@ import cn.hutool.core.date.TimeInterval;
 import cn.hutool.core.exceptions.ExceptionUtil;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpDownloader;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
@@ -599,8 +600,7 @@ public class SceneDownloadHandlerServiceImpl {
                     par += "&imagesVersion="+ imagesVersion;
                 }
 
-                var url = this.
-                    resourceUrl + key;
+                var url = this.resourceUrl + key;
                 FYunTypeEnum storageType = FYunTypeEnum.get(uploadType);
                 switch (storageType){
                     case OSS:
@@ -615,7 +615,8 @@ public class SceneDownloadHandlerServiceImpl {
                     continue;
                 }
                 imgKeys.add(fky);
-                this.zipBytes(out, wwwroot + fky, FileUtils.getBytesFromUrl(url));
+                fYunFileService.downloadFile(fky, "/home/backend/downloads/scenes/" + num + "/" + fky);
+//                this.zipBytes(out, wwwroot + fky, FileUtils.getBytesFromUrl(url));
             }
 
         }