|
@@ -614,13 +614,22 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
continue;
|
|
|
}
|
|
|
imgKeys.add(fky);
|
|
|
- HttpUtil.downloadFile(url, String.format(sourceLocal, sceneNum, this.wwwroot + fky));
|
|
|
+// HttpUtil.downloadFile(url, String.format(sourceLocal, sceneNum, this.wwwroot + fky));
|
|
|
+ this.downloadFile(url, String.format(sourceLocal, sceneNum, this.wwwroot + fky));
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public void downloadFile(String url, String path){
|
|
|
+ File file = new File(path);
|
|
|
+ if(!file.getParentFile().exists()){
|
|
|
+ file.getParentFile().mkdirs();
|
|
|
+ }
|
|
|
+ HttpUtil.downloadFile(url, path);
|
|
|
+ }
|
|
|
+
|
|
|
public void ProcessFiles(String num, String key, String prefix, Set<String> cacheKeys) throws Exception{
|
|
|
if(cacheKeys.contains(key)){
|
|
|
return;
|
|
@@ -641,7 +650,8 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
|
|
|
FileUtil.writeUtf8String(content, String.format(sourceLocal, num, prefix + key));
|
|
|
}else{
|
|
|
- HttpUtil.downloadFile(url, String.format(sourceLocal, num, prefix + key));
|
|
|
+// HttpUtil.downloadFile(url, String.format(sourceLocal, num, prefix + key));
|
|
|
+ this.downloadFile(url, String.format(sourceLocal, num, prefix + key));
|
|
|
}
|
|
|
}
|
|
|
|