|
@@ -286,7 +286,8 @@ public class SceneCommonService {
|
|
String targetData = String.format(SceneResourcePath.DATA_VIEW_PATH,newNum);
|
|
String targetData = String.format(SceneResourcePath.DATA_VIEW_PATH,newNum);
|
|
this.updateOssJson(targetData,oldNum,newNum,"status.json");
|
|
this.updateOssJson(targetData,oldNum,newNum,"status.json");
|
|
this.updateOssJson(targetData,oldNum,newNum,"scene.json");
|
|
this.updateOssJson(targetData,oldNum,newNum,"scene.json");
|
|
-
|
|
|
|
|
|
+ //修改马赛克图片
|
|
|
|
+ this.updateOssFileName(oldNum,newNum);
|
|
|
|
|
|
if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){ //深时复制
|
|
if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){ //深时复制
|
|
laserService.copy(oldNum,newNum,newDataSource,false);
|
|
laserService.copy(oldNum,newNum,newDataSource,false);
|
|
@@ -312,6 +313,25 @@ public class SceneCommonService {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void updateOssFileName(String oldNum, String newNum) {
|
|
|
|
+ //修改图片名称
|
|
|
|
+ try {
|
|
|
|
+ String filePath = String.format(SceneResourcePath.USER_VIEW_PATH, newNum) ;
|
|
|
|
+ List<String> files = fYunFileServiceInterface.listRemoteFiles(filePath);
|
|
|
|
+ for (String ossFilePath : files) {
|
|
|
|
+ if(ossFilePath.contains(oldNum)){
|
|
|
|
+ String oldName = ossFilePath;
|
|
|
|
+ ossFilePath = ossFilePath.replace(oldNum,newNum);
|
|
|
|
+ fYunFileServiceInterface.copyFileInBucket(oldName,ossFilePath);
|
|
|
|
+ fYunFileServiceInterface.deleteFile(oldName);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ log.info("修改名称失败:oldName:{},newNum:{}",oldNum,newNum);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
private void copyOssAndNas(String oldNum,String newNum){
|
|
private void copyOssAndNas(String oldNum,String newNum){
|
|
// 拷贝场景编辑资源
|
|
// 拷贝场景编辑资源
|