|
@@ -471,10 +471,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
try {
|
|
|
String fdagePaht = dataSource.replace("/mnt/data","home") +"/data.fdage";
|
|
|
localPathFdage = String.format(OssPath.localFdagePath,fdagePaht);
|
|
|
- String fileContent = fYunFileServiceInterface.getFileContent(fdagePaht);
|
|
|
-
|
|
|
- JSONObject jsonObject = updateFdageJson(JSONObject.parseObject(fileContent), newSnCode);
|
|
|
- FileUtils.writeFile(localPathFdage ,JSONObject.toJSONString(jsonObject));
|
|
|
+ fYunFileServiceInterface.downloadFile(fdagePaht,localPathFdage);
|
|
|
|
|
|
String oldFdagePaht = dataSource.replace("/mnt/data","home") ;
|
|
|
String[] split = oldFdagePaht.split("/");
|
|
@@ -484,7 +481,13 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
fYunFileServiceInterface.copyFileInBucket(oldFdagePaht,newFdagePath);
|
|
|
fYunFileServiceInterface.deleteFolder(oldFdagePaht);
|
|
|
}
|
|
|
+ fYunFileServiceInterface.uploadFile(localPathFdage,newFdagePath+"/"+oldSnCode+"-"+newSnCode+Dateutils.getDate(new Date())+".data.fdage");
|
|
|
+
|
|
|
+ String fileContent = FileUtils.readFile(localPathFdage);
|
|
|
+ JSONObject jsonObject = updateFdageJson(JSONObject.parseObject(fileContent), newSnCode);
|
|
|
+ FileUtils.writeFile(localPathFdage+".new" ,JSONObject.toJSONString(jsonObject));
|
|
|
fYunFileServiceInterface.uploadFile(localPathFdage,newFdagePath+"/data.fdage");
|
|
|
+
|
|
|
log.info("updateFdage--localPathFdage:{},newFdagePath:{}",localPathFdage,newFdagePath);
|
|
|
String newDataSource = newFdagePath.replace("home","/mnt/data");
|
|
|
this.updateDataSource(dataSource,newDataSource);
|