From 89fba64372f422ee4e68cd4d18e6922b45f9cff5 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 09 十一月 2020 19:45:04 +0800 Subject: [PATCH] 修复录象回放的bug --- src/main/java/com/genersoft/iot/vmp/vmanager/record/RecordController.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/record/RecordController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/record/RecordController.java index 5b947c9..502087e 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/record/RecordController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/record/RecordController.java @@ -4,6 +4,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @@ -16,6 +17,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; import com.genersoft.iot.vmp.storager.IVideoManagerStorager; +@CrossOrigin @RestController @RequestMapping("/api") public class RecordController { @@ -31,11 +33,11 @@ @Autowired private DeferredResultHolder resultHolder; - @GetMapping("/record/{deviceId}") - public DeferredResult<ResponseEntity<RecordInfo>> recordinfo(@PathVariable String deviceId, String channelId, String startTime, String endTime){ + @GetMapping("/record/{deviceId}/{channelId}") + public DeferredResult<ResponseEntity<RecordInfo>> recordinfo(@PathVariable String deviceId,@PathVariable String channelId, String startTime, String endTime){ if (logger.isDebugEnabled()) { - logger.debug(String.format("褰曞儚淇℃伅 API璋冪敤锛宒eviceId锛�%s 锛宻tartTime锛�%s锛� startTime锛�%s",deviceId, startTime, endTime)); + logger.debug(String.format("褰曞儚淇℃伅鏌ヨ API璋冪敤锛宒eviceId锛�%s 锛宻tartTime锛�%s锛� startTime锛�%s",deviceId, startTime, endTime)); } Device device = storager.queryVideoDevice(deviceId); -- Gitblit v1.8.0