|
@@ -89,7 +89,8 @@ public class SceneDownloadHandlerServiceImpl {
|
|
UploadFilePath.DATA_VIEW_PATH,
|
|
UploadFilePath.DATA_VIEW_PATH,
|
|
UploadFilePath.VOICE_VIEW_PATH,
|
|
UploadFilePath.VOICE_VIEW_PATH,
|
|
UploadFilePath.VIDEOS_VIEW_PATH,
|
|
UploadFilePath.VIDEOS_VIEW_PATH,
|
|
- UploadFilePath.IMG_VIEW_PATH
|
|
|
|
|
|
+ UploadFilePath.IMG_VIEW_PATH,
|
|
|
|
+ UploadFilePath.USER_VIEW_PATH,
|
|
};
|
|
};
|
|
|
|
|
|
private static final List<ImageType> imageTypes = Lists.newArrayList();
|
|
private static final List<ImageType> imageTypes = Lists.newArrayList();
|
|
@@ -243,14 +244,14 @@ public class SceneDownloadHandlerServiceImpl {
|
|
}
|
|
}
|
|
|
|
|
|
private int zipOssFiles(ZipOutputStream out, List<String> ossFilePaths, String num, int count, int total, String resolution, int imagesVersion, Set<String> cacheKeys) throws Exception{
|
|
private int zipOssFiles(ZipOutputStream out, List<String> ossFilePaths, String num, int count, int total, String resolution, int imagesVersion, Set<String> cacheKeys) throws Exception{
|
|
- String imageNumPath = "images" + num;
|
|
|
|
|
|
+ String imageNumPath = String.format(UploadFilePath.IMG_VIEW_PATH, num);
|
|
for (String filePath : ossFilePaths) {
|
|
for (String filePath : ossFilePaths) {
|
|
- if(filePath.contains(imageNumPath + "/panorama/panorama_edit/")){
|
|
|
|
|
|
+ if(filePath.contains(imageNumPath + "panorama/panorama_edit/")){
|
|
//如果是编辑目录,只需要更新进度,不需要放进压缩包
|
|
//如果是编辑目录,只需要更新进度,不需要放进压缩包
|
|
this.updateProgress(new BigDecimal(++count).divide(new BigDecimal(total), 6, BigDecimal.ROUND_HALF_UP),
|
|
this.updateProgress(new BigDecimal(++count).divide(new BigDecimal(total), 6, BigDecimal.ROUND_HALF_UP),
|
|
num, SceneDownloadProgressStatus.DOWNLOADING.code(), null);
|
|
num, SceneDownloadProgressStatus.DOWNLOADING.code(), null);
|
|
continue;
|
|
continue;
|
|
- }else if((filePath.contains(imageNumPath + "/panorama/") && filePath.contains("tiles/" + resolution)) || filePath.contains(imageNumPath + "/tiles/" + resolution + "/")) {
|
|
|
|
|
|
+ }else if((filePath.contains(imageNumPath + "panorama/") && filePath.contains("tiles/" + resolution)) || filePath.contains(imageNumPath + "tiles/" + resolution + "/")) {
|
|
this.processImage(filePath, out, resolution, imagesVersion, cacheKeys);
|
|
this.processImage(filePath, out, resolution, imagesVersion, cacheKeys);
|
|
}else{
|
|
}else{
|
|
this.ProcessFiles(filePath, out, this.wwwroot, cacheKeys);
|
|
this.ProcessFiles(filePath, out, this.wwwroot, cacheKeys);
|
|
@@ -338,7 +339,7 @@ public class SceneDownloadHandlerServiceImpl {
|
|
getInfoJson.set("needKey", 0);
|
|
getInfoJson.set("needKey", 0);
|
|
getInfoJson.set("sceneKey","");
|
|
getInfoJson.set("sceneKey","");
|
|
//写入getInfo.json
|
|
//写入getInfo.json
|
|
- String getInfoJsonPath = root + "data/data"+ num + "/getInfo.json";
|
|
|
|
|
|
+ String getInfoJsonPath = root + String.format(UploadFilePath.DATA_VIEW_PATH, num) + "getInfo.json";
|
|
this.zipBytes(out, getInfoJsonPath, getInfoJson.toString().getBytes());
|
|
this.zipBytes(out, getInfoJsonPath, getInfoJson.toString().getBytes());
|
|
return getInfoJson;
|
|
return getInfoJson;
|
|
}
|
|
}
|