|
@@ -571,33 +571,26 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
String sceneJson = redisUtil.get(key);
|
|
|
SceneInfoVO sceneInfoVO = null;
|
|
|
//先查询redis
|
|
|
- if(StrUtil.isNotEmpty(sceneJson)) {
|
|
|
- sceneInfoVO = JSON.parseObject(sceneJson, SceneInfoVO.class);
|
|
|
- sceneInfoVO.setScenePassword(null);
|
|
|
- if(Objects.isNull(sceneInfoVO.getFloorPlanAngle())){
|
|
|
- sceneInfoVO.setFloorPlanAngle(0f);
|
|
|
- }
|
|
|
- if(Objects.isNull(sceneInfoVO.getFloorPlanCompass())){
|
|
|
- sceneInfoVO.setFloorPlanCompass(0f);
|
|
|
- }
|
|
|
- return sceneInfoVO;
|
|
|
+ if(StrUtil.isEmpty(sceneJson)) {
|
|
|
+ String objectName = String.format(ConstantFilePath.SCENE_VIEW_DATA_DATA_SCENEJSON, num);
|
|
|
+ sceneJson = fYunFileService.getFileContent(scenePlusExt.getYunFileBucket(), objectName);
|
|
|
+ redisUtil.set(key, sceneJson);
|
|
|
}
|
|
|
-
|
|
|
- //如果redis没找到,从scene.json中获取
|
|
|
- String objectName = String.format(ConstantFilePath.SCENE_VIEW_DATA_DATA_SCENEJSON, num);
|
|
|
- String objectContent = fYunFileService.getFileContent(scenePlusExt.getYunFileBucket(), objectName);
|
|
|
- log.info("获取scene.json内容,path:{}, content:{}", objectName, objectContent);
|
|
|
- if(StrUtil.isEmpty(objectContent))
|
|
|
- return null;
|
|
|
- sceneInfoVO = JSON.parseObject(objectContent, SceneInfoVO.class);
|
|
|
+ sceneInfoVO = JSON.parseObject(sceneJson, SceneInfoVO.class);
|
|
|
+ sceneInfoVO.setScenePassword(null);
|
|
|
if(Objects.isNull(sceneInfoVO.getFloorPlanAngle())){
|
|
|
sceneInfoVO.setFloorPlanAngle(0f);
|
|
|
}
|
|
|
if(Objects.isNull(sceneInfoVO.getFloorPlanCompass())){
|
|
|
sceneInfoVO.setFloorPlanCompass(0f);
|
|
|
}
|
|
|
- redisUtil.set(key, JSON.toJSONString(sceneInfoVO));
|
|
|
- sceneInfoVO.setScenePassword(null);
|
|
|
+ SceneEditControlsVO controls = sceneInfoVO.getControls();
|
|
|
+ if(Objects.isNull(controls.getShowShare())){
|
|
|
+ controls.setShowScale(CommonStatus.YES.code().intValue());
|
|
|
+ }
|
|
|
+ if(Objects.isNull(controls.getShowCapture())){
|
|
|
+ controls.setShowCapture(CommonStatus.YES.code().intValue());
|
|
|
+ }
|
|
|
|
|
|
return sceneInfoVO;
|
|
|
}
|