Parcourir la source

新增删除接口

xucaiqin il y a 1 an
Parent
commit
1fa0c5df97

+ 9 - 7
iot-module/iot-module-stream/iot-module-stream-biz/src/main/java/com/middle/platform/stream/biz/service/ApiProxy.java

@@ -136,13 +136,11 @@ public class ApiProxy {
     }
 
     public Object rtmpPull(String streamPath, String target, String save) {
-        String sync = getHttp(ApiInfo.RTMP_PULL, new HashMap<>() {{
+        return getHttp(ApiInfo.RTMP_PULL, new HashMap<>() {{
             put("streamPath", streamPath);
             put("target", encode(target));
             put("save", save);
         }});
-        return JSONObject.parseObject(sync, new TypeReference<>() {
-        });
     }
 
     /**
@@ -173,13 +171,11 @@ public class ApiProxy {
     }
 
     public Object rtspPull(String streamPath, String target, String save) {
-        String sync = getHttp(ApiInfo.RTSP_PULL, new HashMap<>() {{
+        return getHttp(ApiInfo.RTSP_PULL, new HashMap<>() {{
             put("streamPath", streamPath);
             put("target", encode(target));
             put("save", save);
         }});
-        return JSONObject.parseObject(sync, new TypeReference<>() {
-        });
     }
 
     public RecordPage recordListPage(String type, int pageSize, int pageNum, String streamPath) {
@@ -192,5 +188,11 @@ public class ApiProxy {
         return JSONObject.parseObject(sync, new TypeReference<>() {
         });
     }
-
+    public Object recordDelete(String path) {
+        String sync = getHttp(ApiInfo.RECORD_DELETE, new HashMap<>() {{
+            put("path", path);
+        }});
+        return JSONObject.parseObject(sync, new TypeReference<>() {
+        });
+    }
 }