Commit 2393d963 authored by 赵啸非's avatar 赵啸非

添加服务追踪

parent d0b98227
......@@ -10,6 +10,7 @@ import com.mortals.xhx.module.realtime.model.RealtimeDataflowEntity;
import com.mortals.xhx.module.realtime.service.RealtimeDataflowService;
import com.mortals.xhx.utils.SpringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.stream.Collectors;
......@@ -47,10 +48,15 @@ public class StrangerRecoginze extends EventTypeAbstract {
//不论识别结果 保存流量数据
RealtimeDataflowEntity realtimeDataflowEntity = new RealtimeDataflowEntity();
realtimeDataflowEntity.initAttrValue();
realtimeDataflowEntity.setSiteId(1L);
realtimeDataflowEntity.setSiteName("宜宾市民中心");
realtimeDataflowEntity.setDetectTime(event.getHappenTime());
String resIndexCodes = eventData.getResInfo().stream().map(i -> i.getIndexCode()).collect(Collectors.joining(","));
realtimeDataflowEntity.setDevice(resIndexCodes);
realtimeDataflowEntity.setPicUri(snap.getFaceUrl());
if(!ObjectUtils.isEmpty(eventData.getResInfo())){
realtimeDataflowEntity.setLocation(eventData.getResInfo().get(0).getCn());
}
realtimeDataflowEntity.setEventId(event.getEventId());
realtimeDataflowEntity.setEventType(HikEventTypeEnum.陌生人员识别事件.getValue().longValue());
realtimeDataflowEntity.setCreateUserId(1L);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment