Commit 276f077dc7aafed06982f6fb0746f6a421ddf73b

Authored by 648540858
1 parent c1145a81

优化接口

src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java
@@ -10,7 +10,6 @@ import com.genersoft.iot.vmp.service.IStreamProxyService; @@ -10,7 +10,6 @@ import com.genersoft.iot.vmp.service.IStreamProxyService;
10 import com.genersoft.iot.vmp.storager.IRedisCatchStorage; 10 import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
11 import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; 11 import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
12 import com.genersoft.iot.vmp.vmanager.bean.StreamContent; 12 import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
13 -import com.genersoft.iot.vmp.vmanager.bean.WVPResult;  
14 import io.swagger.v3.oas.annotations.Operation; 13 import io.swagger.v3.oas.annotations.Operation;
15 import io.swagger.v3.oas.annotations.Parameter; 14 import io.swagger.v3.oas.annotations.Parameter;
16 import io.swagger.v3.oas.annotations.tags.Tag; 15 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -89,7 +88,6 @@ public class MediaController { @@ -89,7 +88,6 @@ public class MediaController {
89 streamInfo = mediaService.getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId, authority); 88 streamInfo = mediaService.getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId, authority);
90 } 89 }
91 90
92 - WVPResult<StreamInfo> result = new WVPResult<>();  
93 if (streamInfo != null){ 91 if (streamInfo != null){
94 return new StreamContent(streamInfo); 92 return new StreamContent(streamInfo);
95 }else { 93 }else {
src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
@@ -94,6 +94,7 @@ public class ApiDeviceController { @@ -94,6 +94,7 @@ public class ApiDeviceController {
94 94
95 @RequestMapping(value = "/channellist") 95 @RequestMapping(value = "/channellist")
96 public JSONObject channellist( String serial, 96 public JSONObject channellist( String serial,
  97 + @RequestParam(required = false)String code,
97 @RequestParam(required = false)String channel_type, 98 @RequestParam(required = false)String channel_type,
98 @RequestParam(required = false)String dir_serial , 99 @RequestParam(required = false)String dir_serial ,
99 @RequestParam(required = false)Integer start, 100 @RequestParam(required = false)Integer start,
@@ -148,9 +149,9 @@ public class ApiDeviceController { @@ -148,9 +149,9 @@ public class ApiDeviceController {
148 // 1-IETF RFC3261, 149 // 1-IETF RFC3261,
149 // 2-基于口令的双向认证, 150 // 2-基于口令的双向认证,
150 // 3-基于数字证书的双向认证 151 // 3-基于数字证书的双向认证
151 - deviceJOSNChannel.put("Status", deviceChannel.getStatus());  
152 - deviceJOSNChannel.put("Longitude", deviceChannel.getLongitudeWgs84());  
153 - deviceJOSNChannel.put("Latitude", deviceChannel.getLatitudeWgs84()); 152 + deviceJOSNChannel.put("Status", deviceChannel.getStatus() == 1 ? "ON":"OFF");
  153 + deviceJOSNChannel.put("Longitude", deviceChannel.getLongitude());
  154 + deviceJOSNChannel.put("Latitude", deviceChannel.getLatitude());
154 deviceJOSNChannel.put("PTZType ", deviceChannel.getPTZType()); // 云台类型, 0 - 未知, 1 - 球机, 2 - 半球, 155 deviceJOSNChannel.put("PTZType ", deviceChannel.getPTZType()); // 云台类型, 0 - 未知, 1 - 球机, 2 - 半球,
155 // 3 - 固定枪机, 4 - 遥控枪机 156 // 3 - 固定枪机, 4 - 遥控枪机
156 deviceJOSNChannel.put("CustomPTZType", ""); 157 deviceJOSNChannel.put("CustomPTZType", "");