|
@@ -136,21 +136,22 @@ public class SceneCommonService {
|
|
|
file.getParentFile().mkdirs();
|
|
|
}
|
|
|
String newJson = fileContent.replaceAll(oldNum,newNum);
|
|
|
- JSONObject jsonObject = JSONObject.parseObject(newJson);
|
|
|
try {
|
|
|
if("v3".equals(sceneVersion)){
|
|
|
if(fileName.contains("scene.json")){
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(newJson);
|
|
|
jsonObject.put("sceneName",newSceneName);
|
|
|
- }
|
|
|
- com.fdkankan.ucenter.util.FileUtil.writeFile(localPath,jsonObject.toJSONString());
|
|
|
-
|
|
|
- if(fileName.contains("scene.json")){
|
|
|
+ com.fdkankan.ucenter.util.FileUtil.writeFile(localPath,jsonObject.toJSONString());
|
|
|
String sceneJsonPath = String.format(SceneResourcePath.dataPath+"/"+fileName, newNum);
|
|
|
fYunFileServiceInterface.uploadFile(localPath, sceneJsonPath);
|
|
|
+ }else {
|
|
|
+ com.fdkankan.ucenter.util.FileUtil.writeFile(localPath,newJson);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
if("v4".equals(sceneVersion)){
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(newJson);
|
|
|
jsonObject.put("title",newSceneName);
|
|
|
com.fdkankan.ucenter.util.FileUtil.writeFile(localPath,jsonObject.toJSONString());
|
|
|
|