Commit 5a3b1c04d6990879531f360423003a59e76a6f89

Authored by 648540858
1 parent 97a87542

补充日志

src/main/java/com/genersoft/iot/vmp/gb28181/event/record/RecordEndEventListener.java
... ... @@ -35,7 +35,7 @@ public class RecordEndEventListener implements ApplicationListener<RecordEndEven
35 35 int sumNum = event.getRecordInfo().getSumNum();
36 36 logger.info("录像查询完成事件触发,deviceId:{}, channelId: {}, 录像数量{}/{}条", event.getRecordInfo().getDeviceId(),
37 37 event.getRecordInfo().getChannelId(), count,sumNum);
38   - if (handlerMap.size() > 0) {
  38 + if (!handlerMap.isEmpty()) {
39 39 RecordEndEventHandler handler = handlerMap.get(deviceId + channelId);
40 40 if (handler !=null){
41 41 handler.handler(event.getRecordInfo());
... ... @@ -43,6 +43,9 @@ public class RecordEndEventListener implements ApplicationListener<RecordEndEven
43 43 handlerMap.remove(deviceId + channelId);
44 44 }
45 45 }
  46 + }else {
  47 + logger.info("录像查询完成事件触发, 但是订阅为空,取消发送,deviceId:{}, channelId: {}",
  48 + event.getRecordInfo().getDeviceId(), event.getRecordInfo().getChannelId());
46 49 }
47 50 }
48 51  
... ... @@ -53,6 +56,7 @@ public class RecordEndEventListener implements ApplicationListener<RecordEndEven
53 56 * @param recordEndEventHandler
54 57 */
55 58 public void addEndEventHandler(String device, String channelId, RecordEndEventHandler recordEndEventHandler) {
  59 + logger.info("录像查询事件添加监听,deviceId:{}, channelId: {}", device, channelId);
56 60 handlerMap.put(device + channelId, recordEndEventHandler);
57 61 }
58 62 /**
... ... @@ -61,6 +65,7 @@ public class RecordEndEventListener implements ApplicationListener<RecordEndEven
61 65 * @param channelId
62 66 */
63 67 public void delEndEventHandler(String device, String channelId) {
  68 + logger.info("录像查询事件移除监听,deviceId:{}, channelId: {}", device, channelId);
64 69 handlerMap.remove(device + channelId);
65 70 }
66 71  
... ...