|
@@ -11,6 +11,7 @@ import com.fdkankan.common.bean.DownLoadProgressBean;
|
|
|
import com.fdkankan.common.bean.DownLoadTaskBean;
|
|
|
import com.fdkankan.common.constant.SceneDownloadProgressStatus;
|
|
|
import com.fdkankan.common.constant.SceneFrom;
|
|
|
+import com.fdkankan.common.constant.SceneResolution;
|
|
|
import com.fdkankan.common.constant.ServerCode;
|
|
|
import com.fdkankan.common.constant.UploadFilePath;
|
|
|
import com.fdkankan.common.response.ResultData;
|
|
@@ -183,6 +184,12 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
if(StrUtil.isNotEmpty(sceneForm) && SceneFrom.PRO.code().equals(sceneForm)){
|
|
|
resolution = "2k";
|
|
|
}
|
|
|
+ //国际版存在已经切好图的情况,下载时不需要再切图,只需要把文件直接下载下来打包就可以了
|
|
|
+ String sceneResolution = sceneJson.getStr("sceneResolution");
|
|
|
+ if(SceneResolution.TILES.code().equals(sceneResolution)){
|
|
|
+ resolution = "notNeadCut";
|
|
|
+ }
|
|
|
+
|
|
|
int imagesVersion = -1;
|
|
|
// TODO: 2022/3/29 V4版本目前没有imagesVersion字段,暂时用version字段替代
|
|
|
// if(getInfoJson.getInt("imagesVersion") != null){
|
|
@@ -282,14 +289,16 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
return;
|
|
|
|
|
|
//切图
|
|
|
- if((filePath.contains(imageNumPath + "panorama/") && filePath.contains("tiles/" + resolution))
|
|
|
- || filePath.contains(imageNumPath + "tiles/" + resolution + "/")) {
|
|
|
- this.processImage(filePath, out, resolution, imagesVersion, cacheKeys);
|
|
|
- return;
|
|
|
+ if(!"notNeadCut".equals(resolution)){
|
|
|
+ if((filePath.contains(imageNumPath + "panorama/") && filePath.contains("tiles/" + resolution))
|
|
|
+ || filePath.contains(imageNumPath + "tiles/" + resolution + "/")) {
|
|
|
+ this.processImage(filePath, out, resolution, imagesVersion, cacheKeys);
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//其他文件打包
|
|
|
- this.ProcessFiles(filePath, out, this.wwwroot, cacheKeys);
|
|
|
+ this.ProcessFiles(num, filePath, out, this.wwwroot, cacheKeys);
|
|
|
}
|
|
|
|
|
|
private void zipLocalFiles(ZipOutputStream out, List<String> v3localFilePaths, String v3localPath, String num, AtomicInteger count, int total) throws Exception{
|
|
@@ -444,10 +453,13 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public void ProcessFiles(String key, ZipOutputStream out, String prefix, Set<String> cacheKeys) throws Exception{
|
|
|
+ public void ProcessFiles(String num, String key, ZipOutputStream out, String prefix, Set<String> cacheKeys) throws Exception{
|
|
|
if(cacheKeys.contains(key)){
|
|
|
return;
|
|
|
}
|
|
|
+ if(key.equals(String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json")){
|
|
|
+ return;
|
|
|
+ }
|
|
|
cacheKeys.add(key);
|
|
|
String url = this.resourceUrl + key + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
if(key.contains("hot.json") || key.contains("link-scene.json")){
|