|
@@ -264,8 +264,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
String meshPath = ConstantFilePath.SCENE_PATH + "data/data" + sceneNum + "/mesh";
|
|
|
FileUtils.deleteDirectory(meshPath);
|
|
|
fYunFileService.downloadFileByCommand(meshPath, "data/data" + sceneNum + "/mesh");
|
|
|
- if(new File(meshPath.concat("/mesh")).listFiles().length > 0){
|
|
|
- for(File file : new File(meshPath.concat("/mesh")).listFiles()){
|
|
|
+ String meshLocalPath = FYunTypeEnum.OSS.code().equals(ossType) ? meshPath.concat("/mesh") : meshPath;
|
|
|
+ if(new File(meshLocalPath).listFiles().length > 0){
|
|
|
+ for(File file : new File(meshLocalPath).listFiles()){
|
|
|
if(file.getName().endsWith(".obj") && !"output.house.obj".equals(file.getName()) &&
|
|
|
!"mesh.obj".equals(file.getName())){
|
|
|
file.delete();
|
|
@@ -275,7 +276,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
file.delete();
|
|
|
}
|
|
|
}
|
|
|
- FileUtils.zipFile(ConstantFilePath.SCENE_PATH + "images/images" + sceneNum + "/" + sceneNum + ".zip", meshPath);
|
|
|
+ FileUtils.zipFile(ConstantFilePath.SCENE_PATH + "images/images" + sceneNum + "/" + sceneNum + ".zip", meshLocalPath);
|
|
|
return ResultData.ok(mainUrl + "/scene/images/images" + sceneNum + "/" + sceneNum + ".zip?t=" +System.currentTimeMillis());
|
|
|
}
|
|
|
}
|