xiewj 5 tháng trước cách đây
mục cha
commit
a15dfd98ff

+ 1 - 28
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/WorkServiceImpl.java

@@ -3,8 +3,6 @@ package com.gis.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.util.NumberUtil;
-import cn.hutool.core.util.ObjUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpRequest;
@@ -1536,32 +1534,7 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
     private void updateWorkOpeningAnimation(JSONObject res, String workId) {
         WorkOpeningAnimationEntity workOpeningAnimationEntity = new WorkOpeningAnimationEntity();
         setBooleanFieldIfPresent(res, "isShowOpeningAnimation", workOpeningAnimationEntity::setIsShowOpeningAnimation);
-        if (res.containsKey("openingAnimationType")&& ObjUtil.isNotEmpty(res.get("openingAnimationType"))){
-            boolean openingAnimationType = NumberUtil.isNumber(res.getString("openingAnimationType"));
-            if (openingAnimationType){
-                setIntegerFieldIfPresent(res, "openingAnimationType", workOpeningAnimationEntity::setOpeningAnimationType);
-            }else {
-                switch (res.getString("openingAnimationType")) {
-                    case "小行星开场":
-                        res.put("openingAnimationType", 1);
-                        break;
-                    case "小行星巡游开场":
-                        res.put("openingAnimationType", 2);
-                        break;
-                    case "小行星缩放开场":
-                        res.put("openingAnimationType", 3);
-                        break;
-                    case "水平巡游开场":
-                        res.put("openingAnimationType", 4);
-                        break;
-                    case "水晶球开场":
-                        res.put("openingAnimationType", 5);
-                        break;
-                }
-            }
-        }
-
-
+        setIntegerFieldIfPresent(res, "openingAnimationType", workOpeningAnimationEntity::setOpeningAnimationType);
         workOpeningAnimationEntity.setWorkId(workId);
         workOpeningAnimationService.save(workOpeningAnimationEntity);
     }

+ 21 - 21
720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/TestController.java

@@ -354,26 +354,26 @@ public class TestController extends BaseController {
         }
         return Result.success();
     }
-//    /**
-//     修复1.4.0版本somedata.json
-//     * @return
-//     */
-//    @ApiOperation(value = "修复1.6.0版本somedata.json", notes = "修复1.4.0版本somedata.json")
-//    @GetMapping("/fixSomeData16")
-//    public Result fixSomeData16(String workId,String active) {
-//        if (workId.equalsIgnoreCase("all")){
-//            List<WorkEntity> all = workService.findAll();
-//            for (WorkEntity workEntity : all) {
-//                if (workEntity.getStatus()==1&&workEntity.getId().startsWith("WK")){
-//                    workService.fixSomeData2(workEntity.getId(),active);
-//                }
-//
-//            }
-//        }else {
-//            workService.fixSomeData2(workId,active);
-//
-//        }
-//        return Result.success();
-//    }
+    /**
+     修复1.4.0版本somedata.json
+     * @return
+     */
+    @ApiOperation(value = "修复1.6.0版本somedata.json", notes = "修复1.4.0版本somedata.json")
+    @GetMapping("/fixSomeData16")
+    public Result fixSomeData16(String workId,String active) {
+        if (workId.equalsIgnoreCase("all")){
+            List<WorkEntity> all = workService.list();
+            for (WorkEntity workEntity : all) {
+                if (workEntity.getStatus()==1&&workEntity.getId().startsWith("WK")){
+                    workService.fixSomeData2(workEntity.getId(),active);
+                }
+
+            }
+        }else {
+            workService.fixSomeData2(workId,active);
+
+        }
+        return Result.success();
+    }
 
 }