浏览代码

Merge branch 'hotfix-36838-20230605-dsx' into test

# Conflicts:
#	src/main/java/com/fdkankan/scene/schedule/ScheduleJob.java
dsx 2 年之前
父节点
当前提交
e8816d13af

+ 2 - 4
src/main/java/com/fdkankan/scene/schedule/ScheduleJob.java

@@ -40,8 +40,7 @@ public class ScheduleJob {
      * 删除场景原始资源
      * 每天凌晨执行
      */
-    @PostConstruct
-    @Scheduled(cron="0 0/30 * * * ?")
+    @Scheduled(cron="0 0 1 * * ?")
     public void cleanOssHomeV3() {
         log.info("删除v3场景原始资源开始");
         String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V3;
@@ -61,8 +60,7 @@ public class ScheduleJob {
      * 删除场景原始资源
      * 每天凌晨执行
      */
-    @PostConstruct
-    @Scheduled(cron="0 0/30 * * * ?")
+    @Scheduled(cron="0 0 1 * * ?")
     public void cleanOssHomeV4() {
         log.info("删除v4场景原始资源开始");
         String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V4;

+ 13 - 20
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -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;
     }

+ 1 - 1
src/main/resources/bootstrap-prod-eur.yml

@@ -3,7 +3,7 @@ spring:
     name: 4dkankan-center-scene
   cloud:
     nacos:
-      server-addr: 172.31.42.151:8848
+      server-addr: 172.31.47.163:8848
       namespace: 4dkankan-v4-prod-eur
       config:
         file-extension: yaml