|
@@ -355,8 +355,8 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
this.updateProgress( null, num, SceneDownloadProgressStatus.DOWNLOAD_FAILED.code(), null, "v3");
|
|
|
throw e;
|
|
|
}finally {
|
|
|
- FileUtil.del(zipPath);
|
|
|
- FileUtil.del(String.format(this.sourceLocal, num, ""));
|
|
|
+// FileUtil.del(zipPath);
|
|
|
+// FileUtil.del(String.format(this.sourceLocal, num, ""));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -550,14 +550,16 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
JSONObject controls = sceneJson.getJSONObject("controls");
|
|
|
controls.set("showLock", 0);
|
|
|
String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json";
|
|
|
- FileUtil.writeUtf8String(sceneJson.toString(), String.format(this.sourceLocal, num, this.wwwroot + sceneJsonPath));
|
|
|
+ String sceneJsonStr = sceneJson.toString().replace(this.publicUrl, "");
|
|
|
+ FileUtil.writeUtf8String(sceneJsonStr, String.format(this.sourceLocal, num, this.wwwroot + sceneJsonPath));
|
|
|
}
|
|
|
|
|
|
private void zipGetInfoJson(String num, JSONObject getInfo) throws Exception{
|
|
|
|
|
|
//访问密码置0
|
|
|
String getInfoKey = String.format("data/data%s/", num) + "getInfo.json";
|
|
|
- FileUtil.writeUtf8String(getInfo.toString(), String.format(this.sourceLocal, num, this.wwwroot + getInfoKey));
|
|
|
+ String getInfoStr = getInfo.toString().replace(this.publicUrl, "");
|
|
|
+ FileUtil.writeUtf8String(getInfoStr, String.format(this.sourceLocal, num, this.wwwroot + getInfoKey));
|
|
|
}
|
|
|
|
|
|
private void processImage(String sceneNum, String key, String resolution, int imagesVersion, Set<String> imgKeys) throws Exception{
|
|
@@ -644,9 +646,11 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
String fileName = key.substring(key.lastIndexOf("/") + 1);
|
|
|
String url = this.resourceUrl + key.replace(fileName, URLEncoder.encode(fileName, "UTF-8")) + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
if(key.contains("hot.json") || key.contains("link-scene.json")){
|
|
|
- String content = FileUtils.getStringFromUrl(url);
|
|
|
-
|
|
|
- content.replace(publicUrl, "")
|
|
|
+ String content = fYunFileService.getFileContent(key);
|
|
|
+ if(StrUtil.isEmpty(content)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ content = content.replace(publicUrl, "")
|
|
|
// .replace(publicUrl+"v3/", "")
|
|
|
.replace("https://spc.html","spc.html")
|
|
|
.replace("https://smobile.html", "smobile.html");
|