From a8ad586204452df2e6e453cdae5865a5177eb58f Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Tue, 31 Dec 2024 15:58:53 +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 --- .../cloudRecord/CloudRecordController.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java index ec4c7165..07c3b3cb 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java @@ -103,14 +103,14 @@ public class CloudRecordController { List mediaServers; if (!ObjectUtils.isEmpty(mediaServerId)) { - mediaServers = null; -// MediaServer mediaServer = mediaServerService.getOne(mediaServerId); -// if (mediaServer == null) { -// throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到流媒体: " + mediaServerId); -// } -// mediaServers.add(mediaServer); + mediaServers = new ArrayList<>(); + MediaServer mediaServer = mediaServerService.getOne(mediaServerId); + if (mediaServer == null) { + throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到流媒体: " + mediaServerId); + } + mediaServers.add(mediaServer); } else { - mediaServers = mediaServerService.getAllOnlineList(); + mediaServers = null; } if (query != null && ObjectUtils.isEmpty(query.trim())) { query = null; @@ -339,10 +339,7 @@ public class CloudRecordController { } mediaServers.add(mediaServer); } else { - mediaServers = mediaServerService.getAll(); - } - if (mediaServers.isEmpty()) { - throw new ControllerException(ErrorCode.ERROR100.getCode(), "当前无流媒体"); + mediaServers = null; } if (query != null && ObjectUtils.isEmpty(query.trim())) { query = null;