xiewj 4 달 전
부모
커밋
e11e0711d3
1개의 변경된 파일16개의 추가작업 그리고 11개의 파일을 삭제
  1. 16 11
      720yun_fd_base/gis_service/src/main/java/com/gis/service/impl/WorkServiceImpl.java

+ 16 - 11
720yun_fd_base/gis_service/src/main/java/com/gis/service/impl/WorkServiceImpl.java

@@ -1878,20 +1878,25 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, WorkEntity> impleme
                 for (WorkHot workHot : workHots) {
                      if (workHot.getHotspotType().equalsIgnoreCase("scene")){
                          String content = workHot.getContent();
-                         JSONObject jsonObject = JSON.parseObject(content);
-                         if (jsonObject.containsKey("scene")) {
-                             JSONObject sceneHotFixJSON = jsonObject.getJSONObject("scene");
-                             if (sceneHotFixJSON.containsKey("id")) {
-                                 WorkNavigationEntity workNavigationEntityBy = workNavigationService.selectByWorkIdAndSomeDataSceneCode(workHot.getWorkId(), sceneHotFixJSON.getString("sceneCode"));
-                                 if (workNavigationEntityBy!=null){
-                                     sceneHotFixJSON.put("id",workNavigationEntityBy.getId());
-                                     JSONObject contents = new JSONObject();
-                                     contents.put("scene",sceneHotFixJSON);
-                                     workHot.setContent(contents.toJSONString().replace("\\\"","\""));
-                                     workHotService.updateById(workHot);
+                         try {
+                             JSONObject jsonObject = JSON.parseObject(content);
+                             if (jsonObject.containsKey("scene")) {
+                                 JSONObject sceneHotFixJSON = jsonObject.getJSONObject("scene");
+                                 if (sceneHotFixJSON.containsKey("id")) {
+                                     WorkNavigationEntity workNavigationEntityBy = workNavigationService.selectByWorkIdAndSomeDataSceneCode(workHot.getWorkId(), sceneHotFixJSON.getString("sceneCode"));
+                                     if (workNavigationEntityBy!=null){
+                                         sceneHotFixJSON.put("id",workNavigationEntityBy.getId());
+                                         JSONObject contents = new JSONObject();
+                                         contents.put("scene",sceneHotFixJSON);
+                                         workHot.setContent(contents.toJSONString().replace("\\\"","\""));
+                                         workHotService.updateById(workHot);
+                                     }
                                  }
                              }
+                         }catch (Exception e){
+                             log.error("转换热点数据出错错误,{}",e);
                          }
+
                      }
 
                 }