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