diff --git a/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/VideoController.java b/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/VideoController.java index 4d9a0a7..3e8ca39 100644 --- a/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/VideoController.java +++ b/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/VideoController.java @@ -20,7 +20,6 @@ import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; @Slf4j @@ -45,11 +44,11 @@ public class VideoController { @Operation(summary = "获取视频 (目前仅供测试)") @GetMapping(produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) @ResponseBody - public void video(HttpServletRequest request, HttpServletResponse response, @ParameterObject VideoReq req, @RequestParam(value = "fileHeader",required = false) Boolean fileHeader) { + public void video(HttpServletRequest request, HttpServletResponse response, @ParameterObject VideoReq req) { if(proxyConfig.getEnable()){ wvpService.video(request,response,req.getDeviceCode(), req.getStartTime(), req.getEndTime()); } else { - gb28181DownloadService.video(request,response,req.getDeviceCode(), req.getStartTime(), req.getEndTime(),fileHeader); + gb28181DownloadService.video(request,response,req.getDeviceCode(), req.getStartTime(), req.getEndTime(), req.getFileHeader()); } } } diff --git a/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/dto/VideoReq.java b/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/dto/VideoReq.java index 49111e3..19dbf6d 100644 --- a/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/dto/VideoReq.java +++ b/gb28181-wvp-proxy-api/src/main/java/cn/skcks/docking/gb28181/wvp/api/video/dto/VideoReq.java @@ -30,6 +30,9 @@ public class VideoReq { @JsonFormat(pattern = DatePattern.PURE_DATETIME_PATTERN) private Date endTime; + @Schema(description = "http 头是否需要文件名") + private Boolean fileHeader = false; + public void setDevice_id(String deviceCode){ this.deviceCode = deviceCode; }