From 1ea95d2b878ac40a055874753bfa643e4e141f0b Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 01 三月 2022 17:48:21 +0800 Subject: [PATCH] Merge branch 'wvp-28181-2.0' of https://github.com/648540858/wvp-GB28181-pro 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