From 481c88f517b3ed9b14dd8a51d9508d419d83b4a7 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 19 Jan 2024 11:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/media/zlm/dto/StreamProxy.java | 16 ++++------------ .../vmp/service/impl/StreamProxyServiceImpl.java | 15 ++++----------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamProxy.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamProxy.java index f5217c9d..e1b0a7b4 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamProxy.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamProxy.java @@ -29,8 +29,6 @@ public class StreamProxy { private String rtpType; @Schema(description = "代理失败的原因") private String proxyError; - @Schema(description = "是否启用") - private boolean enable; @Schema(description = "是否启用音频") private boolean enableAudio; @Schema(description = "是否录制") @@ -53,8 +51,10 @@ public class StreamProxy { private double longitude; @Schema(description = "纬度") private double latitude; - @Schema(description = "状态") - private boolean status; + @Schema(description = "正在拉流") + private boolean pulling; + @Schema(description = "拉流时间") + private String pullTime; @Schema(description = "创建时间") private String createTime; @Schema(description = "更新时间") @@ -226,14 +226,6 @@ public class StreamProxy { this.latitude = latitude; } - public boolean isStatus() { - return status; - } - - public void setStatus(boolean status) { - this.status = status; - } - public String getCreateTime() { return createTime; } diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java index 98ebec2c..a90e48c1 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java @@ -241,7 +241,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService { param.setProxyError(msg); param.setStatus(false); } - addProxyToDb(param); +// updateStatusById(param.get); }); }); } @@ -489,17 +489,14 @@ public class StreamProxyServiceImpl implements IStreamProxyService { if (streamProxyInDb.getCommonGbChannelId() > 0) { commonGbChannelService.deleteById(streamProxyInDb.getCommonGbChannelId()); } - } - if (!ObjectUtils.isEmpty(param.getGbId()) + }else if (!ObjectUtils.isEmpty(param.getGbId()) && ObjectUtils.isEmpty(streamProxyInDb.getGbId())) { CommonGbChannel commonGbChannel = CommonGbChannel.getInstance(param); // 国标ID已经添加 if (commonGbChannelService.add(commonGbChannel) > 0) { param.setCommonGbChannelId(commonGbChannel.getCommonGbId()); } - } - if (param.getGbId() != null && streamProxyInDb.getGbId() != null - && !param.getGbId().equals(streamProxyInDb.getGbId())) { + }else { CommonGbChannel commonGbChannel = CommonGbChannel.getInstance(param); commonGbChannel.setCommonGbId(streamProxyInDb.getCommonGbChannelId()); // 国标ID已经改变 @@ -525,7 +522,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService { }else { return null; } - } } return null; @@ -717,7 +713,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService { }else { commonGbChannelService.offlineForList(ids); } - } } @@ -765,9 +760,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService { if (streamProxy == null) { return; } - if (streamProxy.getCommonGbChannelId() > 0) { - updateStatusById(streamProxy, status); - } + updateStatusById(streamProxy, status); } private void syncPullStream(String mediaServerId){