|
@@ -624,7 +624,10 @@ public class WorkServiceImpl extends IBaseStrServiceImpl<WorkEntity, String> imp
|
|
if (parse.containsKey("someData")) {
|
|
if (parse.containsKey("someData")) {
|
|
JSONObject someData = parse.getJSONObject("someData");
|
|
JSONObject someData = parse.getJSONObject("someData");
|
|
log.info("素材包含someData,进行热点处理");
|
|
log.info("素材包含someData,进行热点处理");
|
|
- if (someData.containsKey("hotspots")){
|
|
|
|
|
|
+ workHotsFodderService.removeBySceneCodeAndWorkIdAndType(sceneCode,workId, SomeDataConstant.hot);
|
|
|
|
+ log.info("先删除关联热点数据");
|
|
|
|
+
|
|
|
|
+ if (someData.containsKey("hotspots")){
|
|
JSONArray hotspots = someData.getJSONArray("hotspots");
|
|
JSONArray hotspots = someData.getJSONArray("hotspots");
|
|
for (Object hotspot : hotspots) {
|
|
for (Object hotspot : hotspots) {
|
|
JSONObject hotspotJson = JSONObject.parseObject(hotspot.toString());
|
|
JSONObject hotspotJson = JSONObject.parseObject(hotspot.toString());
|
|
@@ -633,10 +636,10 @@ public class WorkServiceImpl extends IBaseStrServiceImpl<WorkEntity, String> imp
|
|
//热点唯一ID
|
|
//热点唯一ID
|
|
String name = hotspotJson.getString("name");
|
|
String name = hotspotJson.getString("name");
|
|
|
|
|
|
- if (fodderId.size()>0){
|
|
|
|
- //需要更新时候,先删除关联,在保存关联
|
|
|
|
- workHotsFodderService.removeBySceneCodeAndWorkIdAndType(sceneCode,workId, SomeDataConstant.hot);
|
|
|
|
- }
|
|
|
|
|
|
+// if (fodderId.size()>0){
|
|
|
|
+// //需要更新时候,先删除关联,在保存关联
|
|
|
|
+// workHotsFodderService.removeBySceneCodeAndWorkIdAndType(sceneCode,workId, SomeDataConstant.hot);
|
|
|
|
+// }
|
|
for (Object id : fodderId) {
|
|
for (Object id : fodderId) {
|
|
WorkHotsFodderEntity entity= workHotsFodderService.findBySceneCodeAndWorkIdAndTitleAndNameAndFodderIdAndType(sceneCode,workId,hotspotTitle,name,Long.valueOf(String.valueOf(id)), SomeDataConstant.hot);
|
|
WorkHotsFodderEntity entity= workHotsFodderService.findBySceneCodeAndWorkIdAndTitleAndNameAndFodderIdAndType(sceneCode,workId,hotspotTitle,name,Long.valueOf(String.valueOf(id)), SomeDataConstant.hot);
|
|
if (ObjectUtil.isNotNull(entity)){
|
|
if (ObjectUtil.isNotNull(entity)){
|