From 276f077dc7aafed06982f6fb0746f6a421ddf73b Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 23 十二月 2022 16:52:30 +0800
Subject: [PATCH] 优化接口
---
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java | 2 --
src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java | 7 ++++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java
index 812e044..d135fa2 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java
@@ -10,7 +10,6 @@
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
-import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -89,7 +88,6 @@
streamInfo = mediaService.getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId, authority);
}
- WVPResult<StreamInfo> result = new WVPResult<>();
if (streamInfo != null){
return new StreamContent(streamInfo);
}else {
diff --git a/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java b/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
index 48dbbc4..a5458b0 100644
--- a/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
+++ b/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
@@ -94,6 +94,7 @@
@RequestMapping(value = "/channellist")
public JSONObject channellist( String serial,
+ @RequestParam(required = false)String code,
@RequestParam(required = false)String channel_type,
@RequestParam(required = false)String dir_serial ,
@RequestParam(required = false)Integer start,
@@ -148,9 +149,9 @@
// 1-IETF RFC3261,
// 2-鍩轰簬鍙d护鐨勫弻鍚戣璇�,
// 3-鍩轰簬鏁板瓧璇佷功鐨勫弻鍚戣璇�
- deviceJOSNChannel.put("Status", deviceChannel.getStatus());
- deviceJOSNChannel.put("Longitude", deviceChannel.getLongitudeWgs84());
- deviceJOSNChannel.put("Latitude", deviceChannel.getLatitudeWgs84());
+ deviceJOSNChannel.put("Status", deviceChannel.getStatus() == 1 ? "ON":"OFF");
+ deviceJOSNChannel.put("Longitude", deviceChannel.getLongitude());
+ deviceJOSNChannel.put("Latitude", deviceChannel.getLatitude());
deviceJOSNChannel.put("PTZType ", deviceChannel.getPTZType()); // 浜戝彴绫诲瀷, 0 - 鏈煡, 1 - 鐞冩満, 2 - 鍗婄悆,
// 3 - 鍥哄畾鏋満, 4 - 閬ユ帶鏋満
deviceJOSNChannel.put("CustomPTZType", "");
--
Gitblit v1.8.0