Browse Source

场景下载部署

dengsixing 3 years ago
parent
commit
27ed066782

+ 6 - 5
4dkankan-center-scene-download/src/main/java/com/fdkankan/download/service/impl/SceneDownloadHandlerServiceImpl.java

@@ -89,7 +89,8 @@ public class SceneDownloadHandlerServiceImpl {
         UploadFilePath.DATA_VIEW_PATH,
         UploadFilePath.VOICE_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();
@@ -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{
-        String imageNumPath = "images" + num;
+        String imageNumPath = String.format(UploadFilePath.IMG_VIEW_PATH, num);
         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), 
                     num, SceneDownloadProgressStatus.DOWNLOADING.code(), null);
                 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);
             }else{
                 this.ProcessFiles(filePath, out, this.wwwroot, cacheKeys);
@@ -338,7 +339,7 @@ public class SceneDownloadHandlerServiceImpl {
         getInfoJson.set("needKey", 0);
         getInfoJson.set("sceneKey","");
         //写入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());
         return getInfoJson;
     }