|
@@ -3,6 +3,8 @@ 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;
|
|
@@ -1534,7 +1536,32 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
|
|
|
private void updateWorkOpeningAnimation(JSONObject res, String workId) {
|
|
|
WorkOpeningAnimationEntity workOpeningAnimationEntity = new WorkOpeningAnimationEntity();
|
|
|
setBooleanFieldIfPresent(res, "isShowOpeningAnimation", workOpeningAnimationEntity::setIsShowOpeningAnimation);
|
|
|
- setIntegerFieldIfPresent(res, "openingAnimationType", workOpeningAnimationEntity::setOpeningAnimationType);
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
workOpeningAnimationEntity.setWorkId(workId);
|
|
|
workOpeningAnimationService.save(workOpeningAnimationEntity);
|
|
|
}
|