From e5a9dd24efe3e852445daf1aa8bffd9598985b3a Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 12 一月 2024 14:17:01 +0800 Subject: [PATCH] Merge branch '2.6.9' into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java | 51 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java index 48ff15a..3ac40c3 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java @@ -4,16 +4,19 @@ import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.exception.ControllerException; +import com.genersoft.iot.vmp.conf.security.JwtUtils; import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager; import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import com.genersoft.iot.vmp.service.ICloudRecordService; import com.genersoft.iot.vmp.service.IMediaServerService; import com.genersoft.iot.vmp.service.bean.CloudRecordItem; +import com.genersoft.iot.vmp.service.bean.DownloadFileInfo; import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; import com.github.pagehelper.PageInfo; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import org.apache.commons.lang3.ObjectUtils; import org.slf4j.Logger; @@ -45,7 +48,7 @@ @ResponseBody @GetMapping("/date/list") - @Operation(summary = "鏌ヨ瀛樺湪浜戠褰曞儚鐨勬棩鏈�") + @Operation(summary = "鏌ヨ瀛樺湪浜戠褰曞儚鐨勬棩鏈�", security = @SecurityRequirement(name = JwtUtils.HEADER)) @Parameter(name = "app", description = "搴旂敤鍚�", required = true) @Parameter(name = "stream", description = "娴両D", required = true) @Parameter(name = "year", description = "骞达紝缃┖鍒欐煡璇㈠綋骞�", required = false) @@ -88,7 +91,7 @@ @ResponseBody @GetMapping("/list") - @Operation(summary = "鍒嗛〉鏌ヨ浜戠褰曞儚") + @Operation(summary = "鍒嗛〉鏌ヨ浜戠褰曞儚", security = @SecurityRequirement(name = JwtUtils.HEADER)) @Parameter(name = "query", description = "妫�绱㈠唴瀹�", required = false) @Parameter(name = "app", description = "搴旂敤鍚�", required = false) @Parameter(name = "stream", description = "娴両D", required = false) @@ -172,11 +175,14 @@ @Parameter(name = "mediaServerId", description = "娴佸獟浣揑D", required = false) @Parameter(name = "isEnd", description = "鏄惁缁撴潫", required = false) public JSONArray queryTaskList( + @RequestParam(required = false) String app, + @RequestParam(required = false) String stream, + @RequestParam(required = false) String callId, @RequestParam(required = false) String taskId, @RequestParam(required = false) String mediaServerId, @RequestParam(required = false) Boolean isEnd ){ - return cloudRecordService.queryTask(taskId, mediaServerId, isEnd); + return cloudRecordService.queryTask(app, stream, callId, taskId, mediaServerId, isEnd); } @ResponseBody @@ -188,24 +194,22 @@ @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 = "鏀惰棌绫诲瀷, collect/reserve", required = false) - public void addCollect( + @Parameter(name = "recordId", description = "褰曞儚璁板綍鐨処D锛岀敤浜庣簿鍑嗘敹钘忎竴涓棰戞枃浠�", required = false) + public int addCollect( @RequestParam(required = false) String app, @RequestParam(required = false) 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 collectType, @RequestParam(required = false) Integer recordId ){ - if (!"collect".equals(collectType) && !"reserve".equals(collectType)) { - collectType = "collect"; - } + logger.info("[浜戠褰曞儚] 娣诲姞鏀惰棌锛宎pp={}锛宻tream={},mediaServerId={},startTime={},endTime={},callId={},recordId={}", + app, stream, mediaServerId, startTime, endTime, callId, recordId); if (recordId != null) { - cloudRecordService.changeCollectById(recordId, collectType, true); + return cloudRecordService.changeCollectById(recordId, true); }else { - cloudRecordService.changeCollect(collectType, true, app, stream, mediaServerId, startTime, endTime, callId, collectType); + return cloudRecordService.changeCollect(true, app, stream, mediaServerId, startTime, endTime, callId); } } @@ -218,27 +222,32 @@ @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 = "鏀惰棌绫诲瀷, collect/reserve", required = false) - public void deleteCollect( + @Parameter(name = "recordId", description = "褰曞儚璁板綍鐨処D锛岀敤浜庣簿鍑嗙簿鍑嗙Щ闄や竴涓棰戞枃浠剁殑鏀惰棌", required = false) + public int deleteCollect( @RequestParam(required = false) String app, @RequestParam(required = false) 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 collectType, @RequestParam(required = false) Integer recordId ){ - if (!"collect".equals(collectType) && !"reserve".equals(collectType)) { - collectType = "collect"; - } + logger.info("[浜戠褰曞儚] 绉婚櫎鏀惰棌锛宎pp={}锛宻tream={},mediaServerId={},startTime={},endTime={},callId={},recordId={}", + app, stream, mediaServerId, startTime, endTime, callId, recordId); if (recordId != null) { - cloudRecordService.changeCollectById(recordId, collectType, false); + return cloudRecordService.changeCollectById(recordId, false); }else { - cloudRecordService.changeCollect(collectType, false, app, stream, mediaServerId, startTime, endTime, callId, collectType); + return cloudRecordService.changeCollect(false, app, stream, mediaServerId, startTime, endTime, callId); } } - - + @ResponseBody + @GetMapping("/play/path") + @Operation(summary = "鑾峰彇鎾斁鍦板潃") + @Parameter(name = "recordId", description = "褰曞儚璁板綍鐨処D", required = true) + public DownloadFileInfo getPlayUrlPath( + @RequestParam(required = true) Integer recordId + ){ + return cloudRecordService.getPlayUrlPath(recordId); + } } -- Gitblit v1.8.0