优化云端录像定时清理

This commit is contained in:
648540858
2023-10-19 17:52:19 +08:00
parent 9b036fb71d
commit daac0010b1
13 changed files with 340 additions and 74 deletions

View File

@@ -29,8 +29,6 @@ public class AssistRESTfulUtils {
private OkHttpClient client;
public interface RequestCallback{
void run(JSONObject response);
}
@@ -271,4 +269,13 @@ public class AssistRESTfulUtils {
return sendGet(mediaServerItem, "api/record/file/download/task/list", param, null);
}
public JSONObject addCollect(MediaServerItem mediaServerItem, JSONObject jsonObject) {
return sendPost(mediaServerItem, "api/record/file/collection/add", jsonObject, null, 30);
}
public JSONObject deleteFiles(MediaServerItem mediaServerItem, List<String> filePathList) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("filePathList", filePathList);
return sendPost(mediaServerItem, "api/record/file/delete", jsonObject, null, 15*60);
}
}

View File

@@ -80,8 +80,13 @@ public class MediaServerItem{
@Schema(description = "是否是默认ZLM")
private boolean defaultServer;
@Schema(description = "当前使用到的端口")
private int currentPort;
@Schema(description = "录像存储路径")
private String recordPath;
@Schema(description = "录像存储时长")
private int recordDate;
public MediaServerItem() {
@@ -269,14 +274,6 @@ public class MediaServerItem{
this.updateTime = updateTime;
}
public int getCurrentPort() {
return currentPort;
}
public void setCurrentPort(int currentPort) {
this.currentPort = currentPort;
}
public boolean isStatus() {
return status;
}
@@ -308,4 +305,20 @@ public class MediaServerItem{
public void setSendRtpPortRange(String sendRtpPortRange) {
this.sendRtpPortRange = sendRtpPortRange;
}
public String getRecordPath() {
return recordPath;
}
public void setRecordPath(String recordPath) {
this.recordPath = recordPath;
}
public int getRecordDate() {
return recordDate;
}
public void setRecordDate(int recordDate) {
this.recordDate = recordDate;
}
}