| | |
| | | package com.genersoft.iot.vmp.vmanager.cloudRecord; |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.genersoft.iot.vmp.conf.DynamicTask; |
| | | import com.genersoft.iot.vmp.conf.UserSetting; |
| | | import com.genersoft.iot.vmp.conf.exception.ControllerException; |
| | |
| | | @ResponseBody |
| | | @GetMapping("/list") |
| | | @Operation(summary = "分页查询云端录像") |
| | | @Parameter(name = "app", description = "应用名", required = true) |
| | | @Parameter(name = "stream", description = "流ID", required = true) |
| | | @Parameter(name = "query", description = "检索内容", required = false) |
| | | @Parameter(name = "app", description = "应用名", required = false) |
| | | @Parameter(name = "stream", description = "流ID", required = false) |
| | | @Parameter(name = "page", description = "当前页", required = false) |
| | | @Parameter(name = "count", description = "每页查询数量", required = false) |
| | | @Parameter(name = "startTime", description = "开始时间(yyyy-MM-dd HH:mm:ss)", required = true) |
| | | @Parameter(name = "endTime", description = "结束时间(yyyy-MM-dd HH:mm:ss)", required = true) |
| | | @Parameter(name = "startTime", description = "开始时间(yyyy-MM-dd HH:mm:ss)", required = false) |
| | | @Parameter(name = "endTime", description = "结束时间(yyyy-MM-dd HH:mm:ss)", required = false) |
| | | @Parameter(name = "mediaServerId", description = "流媒体ID,置空则查询全部流媒体", required = false) |
| | | public PageInfo<CloudRecordItem> openRtpServer( |
| | | @RequestParam String app, |
| | | @RequestParam String stream, |
| | | @RequestParam(required = false) String query, |
| | | @RequestParam(required = false) String app, |
| | | @RequestParam(required = false) String stream, |
| | | @RequestParam int page, |
| | | @RequestParam int count, |
| | | @RequestParam String startTime, |
| | | @RequestParam String endTime, |
| | | @RequestParam(required = false) String startTime, |
| | | @RequestParam(required = false) String endTime, |
| | | @RequestParam(required = false) String mediaServerId |
| | | |
| | | ) { |
| | |
| | | if (mediaServerItems.isEmpty()) { |
| | | throw new ControllerException(ErrorCode.ERROR100.getCode(), "当前无流媒体"); |
| | | } |
| | | return cloudRecordService.getList(page, count, app, stream, startTime, endTime, mediaServerItems); |
| | | if (query != null && ObjectUtils.isEmpty(query.trim())) { |
| | | query = null; |
| | | } |
| | | if (app != null && ObjectUtils.isEmpty(app.trim())) { |
| | | app = null; |
| | | } |
| | | if (stream != null && ObjectUtils.isEmpty(stream.trim())) { |
| | | stream = null; |
| | | } |
| | | if (startTime != null && ObjectUtils.isEmpty(startTime.trim())) { |
| | | startTime = null; |
| | | } |
| | | if (endTime != null && ObjectUtils.isEmpty(endTime.trim())) { |
| | | endTime = null; |
| | | } |
| | | return cloudRecordService.getList(page, count, query, app, stream, startTime, endTime, mediaServerItems); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/task/add") |
| | | @Operation(summary = "添加合并任务") |
| | | @Parameter(name = "app", description = "应用名", required = true) |
| | | @Parameter(name = "stream", description = "流ID", required = true) |
| | | @Parameter(name = "mediaServerId", description = "流媒体ID", required = false) |
| | | @Parameter(name = "startTime", description = "鉴权ID", required = false) |
| | | @Parameter(name = "endTime", description = "鉴权ID", required = false) |
| | | @Parameter(name = "callId", description = "鉴权ID", required = false) |
| | | @Parameter(name = "remoteHost", description = "返回地址时的远程地址", required = false) |
| | | public String addTask( |
| | | @RequestParam(required = true) String app, |
| | | @RequestParam(required = true) String stream, |
| | | @RequestParam(required = false) String mediaServerId, |
| | | @RequestParam(required = false) String startTime, |
| | | @RequestParam(required = false) String endTime, |
| | | @RequestParam(required = false) String callId, |
| | | @RequestParam(required = false) String remoteHost |
| | | ){ |
| | | return cloudRecordService.addTask(app, stream, mediaServerId, startTime, endTime, callId, remoteHost); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/task/list") |
| | | @Operation(summary = "查询合并任务") |
| | | @Parameter(name = "taskId", description = "任务Id", required = false) |
| | | @Parameter(name = "mediaServerId", description = "流媒体ID", required = false) |
| | | @Parameter(name = "isEnd", description = "是否结束", required = false) |
| | | public JSONArray queryTaskList( |
| | | @RequestParam(required = false) String taskId, |
| | | @RequestParam(required = false) String mediaServerId, |
| | | @RequestParam(required = false) Boolean isEnd |
| | | ){ |
| | | return cloudRecordService.queryTask(taskId, mediaServerId, isEnd); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/collect/add") |
| | | @Operation(summary = "添加收藏") |
| | | @Parameter(name = "app", description = "应用名", required = true) |
| | | @Parameter(name = "stream", description = "流ID", required = true) |
| | | @Parameter(name = "mediaServerId", description = "流媒体ID", required = false) |
| | | @Parameter(name = "startTime", description = "鉴权ID", required = false) |
| | | @Parameter(name = "endTime", description = "鉴权ID", required = false) |
| | | @Parameter(name = "callId", description = "鉴权ID", required = false) |
| | | @Parameter(name = "collectType", description = "收藏类型", required = false) |
| | | public JSONArray addCollect( |
| | | @RequestParam(required = false) String taskId, |
| | | @RequestParam(required = false) String mediaServerId, |
| | | @RequestParam(required = false) Boolean isEnd |
| | | ){ |
| | | return cloudRecordService.queryTask(taskId, mediaServerId, isEnd); |
| | | } |
| | | |
| | | |
| | | |
| | | } |