修复云端录像查询时间错误
parent
aa3c678839
commit
5f4d148353
|
@ -55,4 +55,9 @@ public interface ICloudRecordService {
|
|||
* 获取播放地址
|
||||
*/
|
||||
DownloadFileInfo getPlayUrlPath(Integer recordId);
|
||||
|
||||
/**
|
||||
* 点播视频流
|
||||
*/
|
||||
DownloadFileInfo getLivePath(Integer recordId);
|
||||
}
|
||||
|
|
|
@ -57,14 +57,14 @@ public class CloudRecordServiceImpl implements ICloudRecordService {
|
|||
if (!DateUtil.verification(startTime, DateUtil.formatter)) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "开始时间格式错误,正确格式为: " + DateUtil.formatter);
|
||||
}
|
||||
startTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(startTime);
|
||||
startTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(startTime) * 1000;
|
||||
|
||||
}
|
||||
if (endTime != null ) {
|
||||
if (!DateUtil.verification(endTime, DateUtil.formatter)) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "结束时间格式错误,正确格式为: " + DateUtil.formatter);
|
||||
}
|
||||
endTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime);
|
||||
endTimeStamp = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime) * 1000;
|
||||
|
||||
}
|
||||
PageHelper.startPage(page, count);
|
||||
|
|
|
@ -252,4 +252,24 @@ public class CloudRecordController {
|
|||
){
|
||||
return cloudRecordService.getPlayUrlPath(recordId);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("/download/path")
|
||||
@Operation(summary = "获取播放地址")
|
||||
@Parameter(name = "recordId", description = "录像记录的ID", required = true)
|
||||
public DownloadFileInfo getDownloadPath(
|
||||
@RequestParam(required = true) Integer recordId
|
||||
){
|
||||
return cloudRecordService.getPlayUrlPath(recordId);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("/play/live")
|
||||
@Operation(summary = "获取点播i地址")
|
||||
@Parameter(name = "recordId", description = "录像记录的ID", required = true)
|
||||
public DownloadFileInfo getLivePath(
|
||||
@RequestParam(required = true) Integer recordId
|
||||
){
|
||||
return cloudRecordService.getLivePath(recordId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue