From 0209dc89c9d5a65aaa1c6e3ae8140dfdb5020dcb Mon Sep 17 00:00:00 2001 From: SaltFish <42058801+SaltFish001@users.noreply.github.com> Date: 星期四, 10 二月 2022 10:29:36 +0800 Subject: [PATCH] Update MediaServiceImpl.java --- src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 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 e0b955f..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 @@ -639,7 +639,7 @@ @Override public List<PlatformCatalog> queryStreamInParentPlatformAndCatalog(String platformId, String catalogId) { - List<PlatformCatalog> catalogs = platformGbStreamMapper.queryChannelInParentPlatformAndCatalogForCatlog(platformId, catalogId); + List<PlatformCatalog> catalogs = platformGbStreamMapper.queryChannelInParentPlatformAndCatalogForCatalog(platformId, catalogId); return catalogs; } @@ -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) { //浜嬪姟鍥炴粴 @@ -814,9 +815,11 @@ streamPushItem.setCatalogId(parentPlatform.getCatalogId()); streamPushItem.setPlatformId(parentPlatform.getServerGBId()); String stream = streamPushItem.getStream(); - StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream, parentPlatform.getServerGBId()); + StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream, + parentPlatform.getServerGBId()); if (streamProxyItems == null) { platformGbStreamMapper.add(streamPushItem); + eventPublisher.catalogEventPublishForStream(parentPlatform.getServerGBId(), streamPushItem, CatalogEvent.ADD); } } } @@ -857,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); } @@ -1018,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"); @@ -1044,4 +1048,20 @@ public GbStream getGbStream(String app, String streamId) { return gbStreamMapper.selectOne(app, streamId); } + + @Override + public void delCatalogByPlatformId(String serverGBId) { + catalogMapper.delByPlatformId(serverGBId); + } + + @Override + public void delRelationByPlatformId(String serverGBId) { + platformGbStreamMapper.delByPlatformId(serverGBId); + platformChannelMapper.delByPlatformId(serverGBId); + } + + @Override + public PlatformCatalog queryDefaultCatalogInPlatform(String platformId) { + return catalogMapper.selectDefaultByPlatFormId(platformId); + } } -- Gitblit v1.8.0