优化通道同步添加对SN的判断,精简代码

This commit is contained in:
648540858
2022-04-17 19:48:05 +08:00
parent 25102229f6
commit 0dc1807f62
11 changed files with 121 additions and 106 deletions

View File

@@ -54,6 +54,7 @@ public class OnlineEventListener implements ApplicationListener<OnlineEvent> {
@Autowired
private SIPCommander cmder;
private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Override
@@ -76,7 +77,7 @@ public class OnlineEventListener implements ApplicationListener<OnlineEvent> {
if (deviceInStore == null) { //第一次上线
logger.info("[{}] 首次注册,查询设备信息以及通道信息", device.getDeviceId());
cmder.deviceInfoQuery(device);
cmder.catalogQuery(device, null);
deviceService.sync(device);
}
break;
// 设备主动发送心跳触发的在线事件