|
@@ -91,14 +91,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
private String ossUrlPrefix;
|
|
|
@Value("${fyun.type}")
|
|
|
private String fyunType;
|
|
|
- @Value("${main.url}")
|
|
|
- private String mainUrl;
|
|
|
- @Value("${scene.url}")
|
|
|
- private String sceneUrl;
|
|
|
- @Value("${scene.pro.url}")
|
|
|
- private String sceneProUrl;
|
|
|
- @Value("${scene.pro.new.url}")
|
|
|
- private String sceneProNewUrl;
|
|
|
@Value("${ecs.checkFile.maxTimes:5}")
|
|
|
private int maxCheckTimes;
|
|
|
@Value("${ecs.checkFile.waitTime:5000}")
|
|
@@ -111,14 +103,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
|
@Autowired
|
|
|
- private ISceneDataDownloadService sceneDataDownloadService;
|
|
|
- @Autowired
|
|
|
- private ISceneProService sceneProService;
|
|
|
- @Autowired
|
|
|
private ISceneEditInfoService sceneEditInfoService;
|
|
|
@Autowired
|
|
|
- private ISceneEditControlsService sceneEditControlsService;
|
|
|
- @Autowired
|
|
|
private IScenePlusService scenePlusService;
|
|
|
@Autowired
|
|
|
private IScenePlusExtService scenePlusExtService;
|
|
@@ -135,8 +121,11 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
|
|
|
+ String thumbUrl = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + param.getFileName();
|
|
|
//更新缩略图url
|
|
|
- String thumbUrl = this.ossUrlPrefix + String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + param.getFileName();
|
|
|
+ if(!FYunTypeEnum.LOCAL.code().equals(fyunType)){
|
|
|
+ thumbUrl = this.ossUrlPrefix + thumbUrl;
|
|
|
+ }
|
|
|
scenePlusExt.setThumb(thumbUrl);
|
|
|
scenePlusExtService.updateById(scenePlusExt);
|
|
|
|
|
@@ -600,7 +589,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
directory.mkdirs();
|
|
|
}
|
|
|
String viewImagesPath = String.format(UploadFilePath.IMG_VIEW_PATH, param.getNum());
|
|
|
- String modeldataUrl = ossUrlPrefix + viewImagesPath + "vision.modeldata?t=" + System.currentTimeMillis();
|
|
|
|
|
|
//如果是云存储,将vision.modeldata下载到本地,如果是本地存储,场景计算完就已经将这个文件拷贝到编辑目录了存在这个文件了,不需要再下载
|
|
|
fYunFileService.downloadFile(bucket, viewImagesPath + "vision.modeldata", localDataPath + "vision.modeldata");
|
|
@@ -906,7 +894,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
ZipUtil.zip(newData, zipPath);
|
|
|
//上传压缩包
|
|
|
fYunFileService.uploadFile(bucket, zipPath, "downloads/extras/" + zipName);
|
|
|
- String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
+ String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
+ if(!FYunTypeEnum.LOCAL.code().equals(fyunType)){
|
|
|
+ url = ossUrlPrefix + url;
|
|
|
+ }
|
|
|
return ResultData.ok(url);
|
|
|
}
|
|
|
|