|
@@ -32,8 +32,6 @@ public class SceneCommonService {
|
|
|
FYunFileServiceInterface fYunFileServiceInterface;
|
|
|
@Autowired
|
|
|
IScene3dNumService scene3dNumService;
|
|
|
- @Autowired
|
|
|
- com.fdkankan.ucenter.util.FileUtil fileUtil;
|
|
|
|
|
|
public String getNewNum(String oldNum ){
|
|
|
String newNum = scene3dNumService.generateSceneNum(1);
|
|
@@ -143,19 +141,18 @@ public class SceneCommonService {
|
|
|
if(fileName.contains("scene.json")){
|
|
|
JSONObject jsonObject = JSONObject.parseObject(newJson);
|
|
|
jsonObject.put("sceneName",newSceneName);
|
|
|
- fileUtil.writeFile(localPath,jsonObject.toJSONString());
|
|
|
+ FileUtils.writeFile(localPath ,jsonObject.toJSONString());
|
|
|
String sceneJsonPath = String.format(SceneResourcePath.dataPath+"/"+fileName, newNum);
|
|
|
fYunFileServiceInterface.uploadFile(localPath, sceneJsonPath);
|
|
|
}else {
|
|
|
- fileUtil.writeFile(localPath,newJson);
|
|
|
+ FileUtils.writeFile(localPath ,newJson);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|
|
|
if("v4".equals(sceneVersion)){
|
|
|
JSONObject jsonObject = JSONObject.parseObject(newJson);
|
|
|
jsonObject.put("title",newSceneName);
|
|
|
- fileUtil.writeFile(localPath,jsonObject.toJSONString());
|
|
|
+ FileUtils.writeFile(localPath, jsonObject.toJSONString());
|
|
|
|
|
|
String sceneJsonPath = String.format(SceneResourcePath.DATA_VIEW_PATH+"/" + fileName, newNum);
|
|
|
fYunFileServiceInterface.uploadFile(localPath, sceneJsonPath);
|
|
@@ -196,7 +193,7 @@ public class SceneCommonService {
|
|
|
if(StringUtils.isNotBlank(fileContent)){
|
|
|
String newJson = fileContent.replaceAll(oldNum,newNum);
|
|
|
try {
|
|
|
- fileUtil.writeFile(localPath,newJson);
|
|
|
+ FileUtils.writeFile(localPath, newJson);
|
|
|
fYunFileServiceInterface.uploadFile(localPath,ossStatusJsonPath);
|
|
|
}catch (Exception e){
|
|
|
log.error("writeFile-error:{}",e);
|