|
@@ -289,6 +289,9 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, Long> implem
|
|
|
FileUtil.del(someDataPath);
|
|
|
// 写入新someDataJson
|
|
|
FileUtil.writeUtf8String(someDataJson.toJSONString(), someDataPath);
|
|
|
+ // 2021-9-23 备份someData.json
|
|
|
+ FileUtil.writeUtf8String(someDataJson.toJSONString(), entity.getPath() + "/someData_"+ System.currentTimeMillis() +".json");
|
|
|
+
|
|
|
log.info("someData.json写入完成");
|
|
|
|
|
|
// 将新的someDataJson上传oss
|
|
@@ -390,6 +393,11 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, Long> implem
|
|
|
FileUtil.del(data2Path);
|
|
|
// 写入新data2.js
|
|
|
FileUtil.writeUtf8String(data2Json.toJSONString(), data2Path);
|
|
|
+
|
|
|
+ // 2021-09-23 备份data2.js
|
|
|
+ FileUtil.writeUtf8String(data2Json.toJSONString(), entity.getPath() + File.separator + "data2_" + System.currentTimeMillis() + ".js");
|
|
|
+
|
|
|
+
|
|
|
log.info("新data2.js写入完成");
|
|
|
|
|
|
// 将新的someDataJson上传oss
|
|
@@ -501,7 +509,8 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, Long> implem
|
|
|
FileUtil.writeUtf8String(dataJsJson.toJSONString(), dataPath);
|
|
|
// log.info("data.js {}", dataJsJson);
|
|
|
|
|
|
-
|
|
|
+ // 2021-09-23 备份数据用
|
|
|
+ FileUtil.writeUtf8String(dataJsJson.toJSONString(), entity.getPath() + "/data_"+ System.currentTimeMillis() + ".js");
|
|
|
|
|
|
|
|
|
//上传oss
|