소스 검색

v4场景下载

dengsixing 2 년 전
부모
커밋
c8c27e796b
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      src/main/java/com/fdkankan/download/service/impl/SceneDownloadHandlerServiceImpl.java

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

@@ -282,8 +282,8 @@ public class SceneDownloadHandlerServiceImpl {
             this.updateProgress( null, num, SceneDownloadProgressStatus.DOWNLOAD_FAILED.code(), null, "v4");
             throw e;
         }finally {
-            FileUtil.del(zipPath);
-            FileUtil.del(String.format(this.sourceLocal, num, ""));
+//            FileUtil.del(zipPath);
+//            FileUtil.del(String.format(this.sourceLocal, num, ""));
         }
     }
 
@@ -651,7 +651,11 @@ public class SceneDownloadHandlerServiceImpl {
             FileUtil.writeUtf8String(content, String.format(sourceLocal, num, prefix + key));
         }else{
 //            HttpUtil.downloadFile(url, String.format(sourceLocal, num, prefix + key));
-            this.downloadFile(url, String.format(sourceLocal, num, prefix + key));
+            try {
+                this.downloadFile(url, String.format(sourceLocal, num, prefix + key));
+            }catch (Exception e){
+                log.info("下载文件报错,path:{}", String.format(sourceLocal, num, prefix + key));
+            }
         }
     }