recordList 判空

This commit is contained in:
zxb 2024-02-06 15:14:39 +08:00
parent d39b68b071
commit bf0a4c2abf

View File

@ -108,8 +108,16 @@ public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent imp
// 接收录像数据
recordEndEventListener.addEndEventHandler(deviceChannel.getDeviceId(), channelId, String.valueOf(sn),(recordInfo)->{
try {
if(recordInfo.getRecordList() == null){
logger.info("[国标级联] 录像查询收到数据, 通道: {}, {}, 准备转发", channelId, sn);
cmderFroPlatform.recordInfo(deviceChannel, parentPlatform, request.getFromTag(), recordInfo);
return;
}
RecordItem item = recordInfo.getRecordList().stream().findFirst().orElse(null);
if(item == null) {
logger.info("[国标级联] 录像查询收到数据, 通道: {}, {}, 准备转发", channelId, sn);
cmderFroPlatform.recordInfo(deviceChannel, parentPlatform, request.getFromTag(), recordInfo);
return;
}
@ -118,7 +126,6 @@ public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent imp
return;
}
set.add(key);
logger.info("[国标级联] 录像查询收到数据, 通道: {}, {}, 准备转发", channelId, sn);
cmderFroPlatform.recordInfo(deviceChannel, parentPlatform, request.getFromTag(), recordInfo);
} catch (SipException | InvalidArgumentException | ParseException e) {