|
@@ -175,37 +175,15 @@ public class UnityServiceImpl implements IUnityService {
|
|
|
fYunFileService.uploadFile(v.getAbsolutePath(), v.getAbsolutePath().replace(workPath, targetDataPath));
|
|
|
});
|
|
|
|
|
|
- //上传文件映射json
|
|
|
-// fYunFileService.uploadFile(workPath + "xxx.json", xspaceSceneOssPath + "xxx.json");
|
|
|
-
|
|
|
-// //复制skybox图
|
|
|
-// String sourceImagesPath = String.format(OSSPathConstant.SCENE_VIEW_DATA_IMAGES, bean.getNum()) + "tiles/4k/";
|
|
|
-// String targetImagesPath = xspaceSceneOssPath + "images/";
|
|
|
-// fYunFileService.copyFileInBucket(sourceImagesPath, targetImagesPath);
|
|
|
-//
|
|
|
-// //复制user
|
|
|
-// String sourceUserPath = String.format(OSSPathConstant.SCENE_VIEW_DATA_USER, bean.getNum());
|
|
|
-// String targetUserPath = xspaceSceneOssPath + "user/";
|
|
|
-// fYunFileService.copyFileInBucket(sourceUserPath, targetUserPath);
|
|
|
-//
|
|
|
-// //上传getInfo.json
|
|
|
-// String getInfoKey = xspaceSceneOssPath + "getInfo.json";
|
|
|
-// SceneInfoVO getInfoJson = this.getSceneInfo4View(bean.getNum());
|
|
|
-// fYunFileService.uploadFile(JSON.toJSONString(getInfoJson).toString().getBytes(StandardCharsets.UTF_8), getInfoKey);
|
|
|
-//
|
|
|
-// //上传floorplan.json
|
|
|
-// String floorplanPath = String.format(OSSPathConstant.SCENE_VIEW_DATA_DATA, bean.getNum()) + "floorplan.json";
|
|
|
-// if(getInfoJson.getFloorPlanUser() == 1){
|
|
|
-// floorplanPath = String.format(OSSPathConstant.SCENE_VIEW_DATA_USER, bean.getNum()) + "floorplan.json";
|
|
|
-// }
|
|
|
-// String xspaceFloorplanPath = xspaceSceneOssPath + "floorplan.json";
|
|
|
-// fYunFileService.copyFileInBucket(floorplanPath, xspaceFloorplanPath);
|
|
|
-//
|
|
|
-// //复制vision.modeldata
|
|
|
-// String sourceVisionPath = String.format(OSSPathConstant.SCENE_VIEW_DATA_IMAGES, bean.getNum()) + "vision.modeldata";
|
|
|
-// String tagetVisionPath = xspaceSceneOssPath + "vision.modeldata";
|
|
|
-// fYunFileService.copyFileInBucket(sourceVisionPath, tagetVisionPath);
|
|
|
-
|
|
|
+ //三维模型
|
|
|
+ String ossBoxModelPath = String.format(OSSPathConstant.SCENE_VIEW_DATA_USER, bean.getNum()) + "boxModels/";
|
|
|
+ String boxModelPath = workPath + "user/boxModels/";
|
|
|
+ List<File> files = FileUtil.loopFiles(boxModelPath);
|
|
|
+ if(CollUtil.isNotEmpty(files)){
|
|
|
+ files.stream().forEach(file->{
|
|
|
+ fYunFileService.uploadFile(file.getAbsolutePath(), file.getAbsolutePath().replace(boxModelPath, ossBoxModelPath));
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|