Commit 3d5842e9e2606cbcefed634dddc2867742d3f84e

Authored by 648540858
1 parent dbf92b96

查询合并文件列表增加app,stream, callId过滤参数

src/main/java/com/genersoft/iot/vmp/media/zlm/AssistRESTfulUtils.java
@@ -257,8 +257,17 @@ public class AssistRESTfulUtils { @@ -257,8 +257,17 @@ public class AssistRESTfulUtils {
257 return sendPost(mediaServerItem, "api/record/file/download/task/add", videoTaskInfoJSON, null, 30); 257 return sendPost(mediaServerItem, "api/record/file/download/task/add", videoTaskInfoJSON, null, 30);
258 } 258 }
259 259
260 - public JSONObject queryTaskList(MediaServerItem mediaServerItem, String taskId, Boolean isEnd) { 260 + public JSONObject queryTaskList(MediaServerItem mediaServerItem, String app, String stream, String callId, String taskId, Boolean isEnd) {
261 Map<String, Object> param = new HashMap<>(); 261 Map<String, Object> param = new HashMap<>();
  262 + if (!ObjectUtils.isEmpty(app)) {
  263 + param.put("app", app);
  264 + }
  265 + if (!ObjectUtils.isEmpty(stream)) {
  266 + param.put("stream", stream);
  267 + }
  268 + if (!ObjectUtils.isEmpty(callId)) {
  269 + param.put("callId", callId);
  270 + }
262 if (!ObjectUtils.isEmpty(taskId)) { 271 if (!ObjectUtils.isEmpty(taskId)) {
263 param.put("taskId", taskId); 272 param.put("taskId", taskId);
264 } 273 }
src/main/java/com/genersoft/iot/vmp/service/ICloudRecordService.java
@@ -38,7 +38,7 @@ public interface ICloudRecordService { @@ -38,7 +38,7 @@ public interface ICloudRecordService {
38 /** 38 /**
39 * 查询合并任务列表 39 * 查询合并任务列表
40 */ 40 */
41 - JSONArray queryTask(String taskId, String mediaServerId, Boolean isEnd); 41 + JSONArray queryTask(String app, String stream, String callId, String taskId, String mediaServerId, Boolean isEnd);
42 42
43 /** 43 /**
44 * 收藏视频,收藏的视频过期不会删除 44 * 收藏视频,收藏的视频过期不会删除
src/main/java/com/genersoft/iot/vmp/service/impl/CloudRecordServiceImpl.java
@@ -124,6 +124,9 @@ public class CloudRecordServiceImpl implements ICloudRecordService { @@ -124,6 +124,9 @@ public class CloudRecordServiceImpl implements ICloudRecordService {
124 remoteHost = "http://" + mediaServerItem.getStreamIp() + ":" + mediaServerItem.getRecordAssistPort(); 124 remoteHost = "http://" + mediaServerItem.getStreamIp() + ":" + mediaServerItem.getRecordAssistPort();
125 } 125 }
126 } 126 }
  127 + if (mediaServerItem.getRecordAssistPort() == 0) {
  128 + throw new ControllerException(ErrorCode.ERROR100.getCode(), "为配置Assist服务");
  129 + }
127 Long startTimeStamp = null; 130 Long startTimeStamp = null;
128 Long endTimeStamp = null; 131 Long endTimeStamp = null;
129 if (startTime != null) { 132 if (startTime != null) {
@@ -148,7 +151,7 @@ public class CloudRecordServiceImpl implements ICloudRecordService { @@ -148,7 +151,7 @@ public class CloudRecordServiceImpl implements ICloudRecordService {
148 } 151 }
149 152
150 @Override 153 @Override
151 - public JSONArray queryTask(String taskId, String mediaServerId, Boolean isEnd) { 154 + public JSONArray queryTask(String app, String stream, String callId, String taskId, String mediaServerId, Boolean isEnd) {
152 MediaServerItem mediaServerItem = null; 155 MediaServerItem mediaServerItem = null;
153 if (mediaServerId == null) { 156 if (mediaServerId == null) {
154 mediaServerItem = mediaServerService.getDefaultMediaServer(); 157 mediaServerItem = mediaServerService.getDefaultMediaServer();
@@ -158,7 +161,7 @@ public class CloudRecordServiceImpl implements ICloudRecordService { @@ -158,7 +161,7 @@ public class CloudRecordServiceImpl implements ICloudRecordService {
158 if (mediaServerItem == null) { 161 if (mediaServerItem == null) {
159 throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到可用的流媒体"); 162 throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到可用的流媒体");
160 } 163 }
161 - JSONObject result = assistRESTfulUtils.queryTaskList(mediaServerItem, taskId, isEnd); 164 + JSONObject result = assistRESTfulUtils.queryTaskList(mediaServerItem, app, stream, callId, taskId, isEnd);
162 if (result.getInteger("code") != 0) { 165 if (result.getInteger("code") != 0) {
163 throw new ControllerException(result.getInteger("code"), result.getString("msg")); 166 throw new ControllerException(result.getInteger("code"), result.getString("msg"));
164 } 167 }
src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java
@@ -172,11 +172,14 @@ public class CloudRecordController { @@ -172,11 +172,14 @@ public class CloudRecordController {
172 @Parameter(name = "mediaServerId", description = "流媒体ID", required = false) 172 @Parameter(name = "mediaServerId", description = "流媒体ID", required = false)
173 @Parameter(name = "isEnd", description = "是否结束", required = false) 173 @Parameter(name = "isEnd", description = "是否结束", required = false)
174 public JSONArray queryTaskList( 174 public JSONArray queryTaskList(
  175 + @RequestParam(required = false) String app,
  176 + @RequestParam(required = false) String stream,
  177 + @RequestParam(required = false) String callId,
175 @RequestParam(required = false) String taskId, 178 @RequestParam(required = false) String taskId,
176 @RequestParam(required = false) String mediaServerId, 179 @RequestParam(required = false) String mediaServerId,
177 @RequestParam(required = false) Boolean isEnd 180 @RequestParam(required = false) Boolean isEnd
178 ){ 181 ){
179 - return cloudRecordService.queryTask(taskId, mediaServerId, isEnd); 182 + return cloudRecordService.queryTask(app, stream, callId, taskId, mediaServerId, isEnd);
180 } 183 }
181 184
182 @ResponseBody 185 @ResponseBody