|
@@ -481,6 +481,19 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
return new AjaxResult(200, "ok", CameraUtil.getPlayFlv(cameraCode, one.getChannel()));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("查询录像")
|
|
|
+ @GetMapping("/api/records/{cameraCode}/{flay}")
|
|
|
+ public AjaxResult apiRecords(@PathVariable @NotNull(message = "相机编码不能为空") String cameraCode,
|
|
|
+ @PathVariable @NotNull(message = "条件不能为空") boolean flay) {
|
|
|
+ LambdaQueryWrapper<BaseCameraManagement> lw = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
|
+ lw.eq(BaseCameraManagement::getCameraCode, cameraCode);
|
|
|
+ BaseCameraManagement one = baseCameraManagementService.getOne(lw);
|
|
|
+ if (ObjectUtils.isEmpty(one)) {
|
|
|
+ throw new BaseException("相机编号【" + cameraCode + "】不存在");
|
|
|
+ }
|
|
|
+ return new AjaxResult(200, "ok", CameraUtil.getPlayFlv(cameraCode, one.getChannel(), flay));
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("批量查询录像")
|
|
|
@GetMapping("/api/recordsList")
|
|
|
public AjaxResult apiRecordsList(@RequestBody
|
|
@@ -494,7 +507,12 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
if (ObjectUtils.isEmpty(one)) {
|
|
|
throw new BaseException("相机编号【" + cameraCode + "】不存在");
|
|
|
}
|
|
|
- String playFlv = CameraUtil.getPlayFlv(cameraCode, one.getChannel());
|
|
|
+ String playFlv = null;
|
|
|
+ if (list.size() > 5) {
|
|
|
+ playFlv = CameraUtil.getPlayFlv(cameraCode, one.getChannel(), false);
|
|
|
+ } else {
|
|
|
+ playFlv = CameraUtil.getPlayFlv(cameraCode, one.getChannel());
|
|
|
+ }
|
|
|
list.add(playFlv);
|
|
|
}
|
|
|
|