From effe71640daeae0f7e2442176369996bab8fa4ee Mon Sep 17 00:00:00 2001 From: quangz <quangz@bluewisdom.com.cn> Date: 星期三, 27 四月 2022 18:51:47 +0800 Subject: [PATCH] 修复ServerTransaction空指针异常 --- src/main/java/com/genersoft/iot/vmp/gb28181/event/online/OnlineEventListener.java | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/online/OnlineEventListener.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/online/OnlineEventListener.java index e454d49..1fc1e46 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/online/OnlineEventListener.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/online/OnlineEventListener.java @@ -54,14 +54,13 @@ @Autowired private SIPCommander cmder; + private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @Override public void onApplicationEvent(OnlineEvent event) { - - if (logger.isDebugEnabled()) { - logger.debug("璁惧涓婄嚎浜嬩欢瑙﹀彂锛宒eviceId锛�" + event.getDevice().getDeviceId() + ",from:" + event.getFrom()); - } + + logger.info("璁惧涓婄嚎浜嬩欢瑙﹀彂锛宒eviceId锛�" + event.getDevice().getDeviceId() + ",from:" + event.getFrom()); Device device = event.getDevice(); if (device == null) return; String key = VideoManagerConstants.KEEPLIVEKEY_PREFIX + userSetting.getServerId() + "_" + event.getDevice().getDeviceId(); @@ -76,7 +75,7 @@ if (deviceInStore == null) { //绗竴娆′笂绾� logger.info("[{}] 棣栨娉ㄥ唽锛屾煡璇㈣澶囦俊鎭互鍙婇�氶亾淇℃伅", device.getDeviceId()); cmder.deviceInfoQuery(device); - cmder.catalogQuery(device, null); + deviceService.sync(device); } break; // 璁惧涓诲姩鍙戦�佸績璺宠Е鍙戠殑鍦ㄧ嚎浜嬩欢 -- Gitblit v1.8.0