可选是否要文件头
This commit is contained in:
parent
b12cdba22f
commit
f5da6cf084
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user