Commit 276f077dc7aafed06982f6fb0746f6a421ddf73b
1 parent
c1145a81
优化接口
Showing
2 changed files
with
4 additions
and
5 deletions
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java
| ... | ... | @@ -10,7 +10,6 @@ import com.genersoft.iot.vmp.service.IStreamProxyService; |
| 10 | 10 | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| 11 | 11 | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| 12 | 12 | import com.genersoft.iot.vmp.vmanager.bean.StreamContent; |
| 13 | -import com.genersoft.iot.vmp.vmanager.bean.WVPResult; | |
| 14 | 13 | import io.swagger.v3.oas.annotations.Operation; |
| 15 | 14 | import io.swagger.v3.oas.annotations.Parameter; |
| 16 | 15 | import io.swagger.v3.oas.annotations.tags.Tag; |
| ... | ... | @@ -89,7 +88,6 @@ public class MediaController { |
| 89 | 88 | streamInfo = mediaService.getStreamInfoByAppAndStreamWithCheck(app, stream, mediaServerId, authority); |
| 90 | 89 | } |
| 91 | 90 | |
| 92 | - WVPResult<StreamInfo> result = new WVPResult<>(); | |
| 93 | 91 | if (streamInfo != null){ |
| 94 | 92 | return new StreamContent(streamInfo); |
| 95 | 93 | }else { | ... | ... |
src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
| ... | ... | @@ -94,6 +94,7 @@ public class ApiDeviceController { |
| 94 | 94 | |
| 95 | 95 | @RequestMapping(value = "/channellist") |
| 96 | 96 | public JSONObject channellist( String serial, |
| 97 | + @RequestParam(required = false)String code, | |
| 97 | 98 | @RequestParam(required = false)String channel_type, |
| 98 | 99 | @RequestParam(required = false)String dir_serial , |
| 99 | 100 | @RequestParam(required = false)Integer start, |
| ... | ... | @@ -148,9 +149,9 @@ public class ApiDeviceController { |
| 148 | 149 | // 1-IETF RFC3261, |
| 149 | 150 | // 2-基于口令的双向认证, |
| 150 | 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 | 155 | deviceJOSNChannel.put("PTZType ", deviceChannel.getPTZType()); // 云台类型, 0 - 未知, 1 - 球机, 2 - 半球, |
| 155 | 156 | // 3 - 固定枪机, 4 - 遥控枪机 |
| 156 | 157 | deviceJOSNChannel.put("CustomPTZType", ""); | ... | ... |