|
@@ -177,6 +177,8 @@ public class SceneServiceImpl extends ServiceImpl<SceneMapper,SceneEntity> imple
|
|
|
SceneEntity entity = this.findBySceneCode(sceneCode);
|
|
|
BaseRuntimeException.isNull(entity, null, "场景不存在:" + sceneCode);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
String someDataPath = basePath + "/someData.json";
|
|
|
BaseRuntimeException.isTrue(!FileUtil.isFile(someDataPath), null, "someData.json文件不存在");
|
|
|
|
|
@@ -196,7 +198,12 @@ public class SceneServiceImpl extends ServiceImpl<SceneMapper,SceneEntity> imple
|
|
|
|
|
|
if (info != null) {
|
|
|
JSONObject infoJson = JSONObject.parseObject(info);
|
|
|
-
|
|
|
+ // 更新title
|
|
|
+ String name = infoJson.getString("name");
|
|
|
+ if (!StrUtil.equals(name, entity.getSceneTitle())){
|
|
|
+ entity.setSceneTitle(name);
|
|
|
+ this.updateById(entity);
|
|
|
+ }
|
|
|
// 处理model
|
|
|
JSONObject model = someDataJson.getJSONObject("model");
|
|
|
if (model != null) {
|