From 3b5a37c270e5b6649b9a168ee753c2b3353a257a Mon Sep 17 00:00:00 2001
From: zouyaoji <370681295@qq.com>
Date: 星期六, 06 八月 2022 11:27:02 +0800
Subject: [PATCH] 前端显示媒体服务器配置时报错修复
---
src/main/java/com/genersoft/iot/vmp/vmanager/streamProxy/StreamProxyController.java | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/streamProxy/StreamProxyController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/streamProxy/StreamProxyController.java
index f8c01dd..f21bfd1 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/streamProxy/StreamProxyController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/streamProxy/StreamProxyController.java
@@ -1,9 +1,11 @@
package com.genersoft.iot.vmp.vmanager.streamProxy;
import com.alibaba.fastjson.JSONObject;
+import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
import com.genersoft.iot.vmp.service.IMediaServerService;
+import com.genersoft.iot.vmp.service.IMediaService;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.service.IStreamProxyService;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
@@ -67,11 +69,16 @@
@ResponseBody
public WVPResult save(@RequestBody StreamProxyItem param){
logger.info("娣诲姞浠g悊锛� " + JSONObject.toJSONString(param));
- if (StringUtils.isEmpty(param.getMediaServerId())) param.setMediaServerId("auto");
- String msg = streamProxyService.save(param);
- WVPResult<Object> result = new WVPResult<>();
- result.setCode(0);
- result.setMsg(msg);
+ if (StringUtils.isEmpty(param.getMediaServerId())) {
+ param.setMediaServerId("auto");
+ }
+ if (StringUtils.isEmpty(param.getType())) {
+ param.setType("default");
+ }
+ if (StringUtils.isEmpty(param.getGbId())) {
+ param.setGbId(null);
+ }
+ WVPResult<StreamInfo> result = streamProxyService.save(param);
return result;
}
@@ -124,6 +131,9 @@
public Object start(String app, String stream){
logger.info("鍚敤浠g悊锛� " + app + "/" + stream);
boolean result = streamProxyService.start(app, stream);
+ if (!result) {
+ logger.info("鍚敤浠g悊澶辫触锛� " + app + "/" + stream);
+ }
return result?"success":"fail";
}
--
Gitblit v1.8.0