From 4bd4f50b4165953018a9f9174056d29d087fdaee Mon Sep 17 00:00:00 2001
From: szy833 <31844882+szy833@users.noreply.github.com>
Date: 星期日, 16 一月 2022 23:32:51 +0800
Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0

---
 src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java b/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
index 8d1f0c3..2e96fbe 100644
--- a/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
+++ b/src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
@@ -110,14 +110,14 @@
             return result;
         }
         List<DeviceChannel> deviceChannels;
+        List<DeviceChannel> allDeviceChannelList = storager.queryChannelsByDeviceId(serial);
         if (start == null || limit ==null) {
-            deviceChannels = storager.queryChannelsByDeviceId(serial);
+            deviceChannels = allDeviceChannelList;
             result.put("ChannelCount", deviceChannels.size());
         }else {
-            start ++;
-            PageInfo pageResult = storager.queryChannelsByDeviceId(serial, null, null, null,start, limit);
-            result.put("ChannelCount", pageResult.getList().size());
-            deviceChannels = pageResult.getList();
+            deviceChannels = storager.queryChannelsByDeviceIdWithStartAndLimit(serial, null, null, null,start, limit);
+            int total = allDeviceChannelList.size();
+            result.put("ChannelCount", total);
         }
 
         JSONArray channleJSONList = new JSONArray();

--
Gitblit v1.8.0