From 1e2d207aea24b5956d5ece95ed4a9db0f59f34d7 Mon Sep 17 00:00:00 2001
From: 648540858 <456panlinlin>
Date: 星期五, 22 四月 2022 16:21:05 +0800
Subject: [PATCH] 添加优化后的地图页面,完全一处百度地图相关的api

---
 src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java
index c360843..7d11b15 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java
@@ -10,6 +10,7 @@
 import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
 import com.genersoft.iot.vmp.service.IDeviceService;
 import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
+import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
 import com.github.pagehelper.util.StringUtil;
 
 import io.swagger.annotations.Api;
@@ -65,10 +66,11 @@
             @ApiImplicitParam(name = "start", value = "寮�濮嬫椂闂�", required = true, dataTypeClass = String.class),
             @ApiImplicitParam(name = "end", value = "缁撴潫鏃堕棿", required = true, dataTypeClass = String.class),
     })
-    @GetMapping("/history/{deviceId}")
-    public ResponseEntity<List<MobilePosition>> positions(@PathVariable String deviceId,
-                                                    @RequestParam(required = false) String start,
-                                                    @RequestParam(required = false) String end) {
+    @GetMapping("/history/{deviceId}/{channelId}")
+    public ResponseEntity<WVPResult<List<MobilePosition>>> positions(@PathVariable String deviceId,
+                                                                     @PathVariable String channelId,
+                                                                     @RequestParam(required = false) String start,
+                                                                     @RequestParam(required = false) String end) {
 //        if (logger.isDebugEnabled()) {
 //            logger.debug("鏌ヨ璁惧" + deviceId + "鐨勫巻鍙茶建杩�");
 //        }
@@ -79,9 +81,11 @@
         if (StringUtil.isEmpty(end)) {
             end = null;
         }
-
-        List<MobilePosition> result = storager.queryMobilePositions(deviceId, start, end);
-        return new ResponseEntity<>(result, HttpStatus.OK);
+        WVPResult<List<MobilePosition>> wvpResult = new WVPResult<>();
+        wvpResult.setCode(0);
+        List<MobilePosition> result = storager.queryMobilePositions(deviceId, channelId, start, end);
+        wvpResult.setData(result);
+        return new ResponseEntity<>(wvpResult, HttpStatus.OK);
     }
 
     /**

--
Gitblit v1.8.0