From c8b9e590efaf5e7a10724b5f26f14de741e3c8a7 Mon Sep 17 00:00:00 2001
From: chenjialing <595168663@qq.com>
Date: 星期五, 25 二月 2022 09:23:46 +0800
Subject: [PATCH] 日志优化--优化本地的日志记录方式,增加druid的sql的日志打印和监控面板,修改druid的配置方式

---
 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