From 8cfff8db97b7e51578424b6a202ae80cd56923a2 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 28 一月 2022 16:30:10 +0800 Subject: [PATCH] 添加对可能空指针的判断 --- src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java index dc4d497..f43f92f 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java @@ -679,6 +679,7 @@ streamProxyItem.setStatus(true); String now = this.format.format(System.currentTimeMillis()); streamProxyItem.setCreateTime(now); + streamProxyItem.setCreateStamp(System.currentTimeMillis()); try { if (gbStreamMapper.add(streamProxyItem)<0 || streamProxyMapper.add(streamProxyItem) < 0) { //浜嬪姟鍥炴粴 @@ -859,8 +860,8 @@ } @Override - public List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean enable) { - return streamProxyMapper.selectForEnableInMediaServer(id, enable); + public List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean enable, boolean status) { + return streamProxyMapper.selectForEnableInMediaServer(id, enable, status); } @@ -1020,7 +1021,8 @@ deviceChannel.setParental(1); deviceChannel.setParentId(catalog.getParentId()); deviceChannel.setRegisterWay(1); - deviceChannel.setCivilCode(sipConfig.getDomain()); + // 琛屾斂鍖哄垝搴旇鏄疍omain鐨勫墠鍏綅 + deviceChannel.setCivilCode(sipConfig.getDomain().substring(0, sipConfig.getDomain().length() - 2)); deviceChannel.setModel("live"); deviceChannel.setOwner("wvp-pro"); deviceChannel.setSecrecy("0"); @@ -1057,4 +1059,9 @@ platformGbStreamMapper.delByPlatformId(serverGBId); platformChannelMapper.delByPlatformId(serverGBId); } + + @Override + public PlatformCatalog queryDefaultCatalogInPlatform(String platformId) { + return catalogMapper.selectDefaultByPlatFormId(platformId); + } } -- Gitblit v1.8.0