优化代码

This commit is contained in:
XinYi Song 2022-02-12 16:04:53 +08:00
parent 29a7eb579c
commit 6d59774cfa

View File

@ -15,6 +15,7 @@ public class GetVideoTool {
public static String getVideo(String alarmCode) throws JsonProcessingException {
String token = GetTokenTool.getToken();
// 查询报警联动录像
String url = "https://111.26.161.203:443/admin/API/SS/Record/GetAlarmRecords?token=" + token;
JSONObject jsonObject = new JSONObject();
jsonObject.put("clientType","WINPC_V1");
@ -32,6 +33,7 @@ public class GetVideoTool {
JsonNode data = jsonNode.get("data");
JsonNode records = data.get("records").get(0);
// 录像回放下载
String urlVideo = "/admin/API/SS/Playback/StartPlaybackByFile?token=" + token;
JSONObject jsonObject2 = new JSONObject();
jsonObject2.put("ssId",records.get("ssId").asText());