Commit 25e3069b by xmh

修改 Behavior 中 eventData 存储的数据

1 parent 2b39aaf6
package com.viontech.fanxing.forward.batch.processor; package com.viontech.fanxing.forward.batch.processor;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.viontech.fanxing.commons.model.Behavior; import com.viontech.fanxing.commons.model.Behavior;
import com.viontech.fanxing.forward.util.CacheUtils; import com.viontech.fanxing.forward.util.CacheUtils;
...@@ -47,7 +46,6 @@ public class BehaviorProcessor implements ItemStream, ItemProcessor<JSONObject, ...@@ -47,7 +46,6 @@ public class BehaviorProcessor implements ItemStream, ItemProcessor<JSONObject,
String taskName = item.getString("task_name"); String taskName = item.getString("task_name");
Date eventTime = DateUtil.parse(DateUtil.FORMAT_FULL, eventDt); Date eventTime = DateUtil.parse(DateUtil.FORMAT_FULL, eventDt);
JSONArray video = item.getJSONArray("video");
String picArray = item.getString("pic_path_array"); String picArray = item.getString("pic_path_array");
behavior.setTaskId(taskId); behavior.setTaskId(taskId);
...@@ -60,9 +58,7 @@ public class BehaviorProcessor implements ItemStream, ItemProcessor<JSONObject, ...@@ -60,9 +58,7 @@ public class BehaviorProcessor implements ItemStream, ItemProcessor<JSONObject,
behavior.setPics(picArray); behavior.setPics(picArray);
String videoName = item.getString("video_name"); String videoName = item.getString("video_name");
behavior.setVideo(videoName); behavior.setVideo(videoName);
behavior.setEventData(item.toJSONString());
behavior.setEventData(eventData == null ? null : eventData.toJSONString());
behavior.setVideo(video == null ? null : video.toJSONString());
return behavior; return behavior;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!