From 2591997dfc8995a788b07dd41f42aac77c6fc4fb Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 12 八月 2022 10:00:18 +0800
Subject: [PATCH] 修复文档错误
---
src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java | 65 +++++++++++++++++++++++++++++---
1 files changed, 58 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java
index c27fb0e..2311d4b 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java
@@ -4,9 +4,12 @@
import com.alibaba.fastjson.JSONObject;
import com.genersoft.iot.vmp.VManageBootstrap;
import com.genersoft.iot.vmp.common.VersionPo;
+import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.SipConfig;
-import com.genersoft.iot.vmp.conf.UserSetup;
+import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.VersionInfo;
+import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookSubscribe;
+import com.genersoft.iot.vmp.media.zlm.dto.IHookSubscribe;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
import com.genersoft.iot.vmp.service.IMediaServerService;
import com.genersoft.iot.vmp.utils.SpringBeanFactory;
@@ -27,6 +30,7 @@
import javax.sip.SipProvider;
import java.util.Iterator;
import java.util.List;
+import java.util.Set;
@SuppressWarnings("rawtypes")
@Api(tags = "鏈嶅姟鎺у埗")
@@ -36,19 +40,22 @@
public class ServerController {
@Autowired
- private ConfigurableApplicationContext context;
+ private ZLMHttpHookSubscribe zlmHttpHookSubscribe;
@Autowired
private IMediaServerService mediaServerService;
@Autowired
- VersionInfo versionInfo;
+ private VersionInfo versionInfo;
@Autowired
- SipConfig sipConfig;
+ private SipConfig sipConfig;
@Autowired
- UserSetup userSetup;
+ private UserSetting userSetting;
+
+ @Autowired
+ private DynamicTask dynamicTask;
@Value("${server.port}")
private int serverPort;
@@ -158,6 +165,7 @@
public WVPResult<String> deleteMediaServer(@RequestParam String id){
if (mediaServerService.getOne(id) != null) {
mediaServerService.delete(id);
+ mediaServerService.deleteDb(id);
}else {
WVPResult<String> result = new WVPResult<>();
result.setCode(-1);
@@ -231,14 +239,14 @@
jsonObject.put("server.port", serverPort);
if (StringUtils.isEmpty(type)) {
jsonObject.put("sip", JSON.toJSON(sipConfig));
- jsonObject.put("base", JSON.toJSON(userSetup));
+ jsonObject.put("base", JSON.toJSON(userSetting));
}else {
switch (type){
case "sip":
jsonObject.put("sip", sipConfig);
break;
case "base":
- jsonObject.put("base", userSetup);
+ jsonObject.put("base", userSetting);
break;
default:
break;
@@ -247,4 +255,47 @@
result.setData(jsonObject);
return result;
}
+
+ @ApiOperation("鑾峰彇褰撳墠鎵�鏈塰ook")
+ @GetMapping(value = "/hooks")
+ @ResponseBody
+ public WVPResult<List<IHookSubscribe>> getHooks(){
+ WVPResult<List<IHookSubscribe>> result = new WVPResult<>();
+ result.setCode(0);
+ result.setMsg("success");
+ List<IHookSubscribe> all = zlmHttpHookSubscribe.getAll();
+ result.setData(all);
+ return result;
+ }
+
+// @ApiOperation("褰撳墠杩涜涓殑鍔ㄦ�佷换鍔�")
+// @GetMapping(value = "/dynamicTask")
+// @ResponseBody
+// public WVPResult<JSONObject> getDynamicTask(){
+// WVPResult<JSONObject> result = new WVPResult<>();
+// result.setCode(0);
+// result.setMsg("success");
+//
+// JSONObject jsonObject = new JSONObject();
+//
+// Set<String> allKeys = dynamicTask.getAllKeys();
+// jsonObject.put("server.port", serverPort);
+// if (StringUtils.isEmpty(type)) {
+// jsonObject.put("sip", JSON.toJSON(sipConfig));
+// jsonObject.put("base", JSON.toJSON(userSetting));
+// }else {
+// switch (type){
+// case "sip":
+// jsonObject.put("sip", sipConfig);
+// break;
+// case "base":
+// jsonObject.put("base", userSetting);
+// break;
+// default:
+// break;
+// }
+// }
+// result.setData(jsonObject);
+// return result;
+// }
}
--
Gitblit v1.8.0