From e2fd8ddf8b34d00dac0b97bdba77372baa36104d Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Sun, 14 Jan 2024 16:01:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=9A=E7=94=A8=E9=80=9A?= =?UTF-8?q?=E9=81=93=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/ICommonGbChannelService.java | 2 +- .../vmp/service/impl/CommonGbChannelServiceImpl.java | 8 +++++++- .../vmanager/channel/CommonChannelController.java | 12 ++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/ICommonGbChannelService.java b/src/main/java/com/genersoft/iot/vmp/service/ICommonGbChannelService.java index 091adb71..cc507f04 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/ICommonGbChannelService.java +++ b/src/main/java/com/genersoft/iot/vmp/service/ICommonGbChannelService.java @@ -31,7 +31,7 @@ public interface ICommonGbChannelService { PageInfo queryChannelListInGroup(int page, int count, String query, String groupDeviceId, String regionDeviceId, Boolean inGroup, Boolean inRegion, - String type); + String type, String ptzType, Boolean online); PageInfo queryChannelList(String query, int page, int count); diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/CommonGbChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/CommonGbChannelServiceImpl.java index 6d446a52..c304a8a6 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/CommonGbChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/CommonGbChannelServiceImpl.java @@ -137,8 +137,11 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService { @Override public PageInfo queryChannelListInGroup(int page, int count, String query, String groupDeviceId, String regionDeviceId, Boolean inGroup, Boolean inRegion, - String type) { + String type, String ptzType, Boolean online) { PageHelper.startPage(page, count); + if (query != null && ObjectUtils.isEmpty(query.trim())) { + query = null; + } if (groupDeviceId != null && ObjectUtils.isEmpty(groupDeviceId.trim())) { inGroup = null; } @@ -148,6 +151,9 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService { if (type != null && ObjectUtils.isEmpty(type.trim())) { type = null; } + if (ptzType != null && ObjectUtils.isEmpty(ptzType.trim())) { + ptzType = null; + } List all = commonGbChannelMapper.queryChannelListInGroup(query, groupDeviceId, regionDeviceId, inGroup, inRegion, type); return new PageInfo<>(all); diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/channel/CommonChannelController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/channel/CommonChannelController.java index 44d91b7e..e71ac353 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/channel/CommonChannelController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/channel/CommonChannelController.java @@ -54,9 +54,8 @@ public class CommonChannelController { @Operation(summary = "更新通道信息") @Parameter(name = "CommonGbChannel", description = "commonGbChannel", required = true) @ResponseBody - @GetMapping("/update") - public void update( - @RequestParam(required = false) CommonGbChannel commonGbChannel + @PostMapping("/update") + public void update(@RequestBody CommonGbChannel commonGbChannel ){ commonGbChannelService.update(commonGbChannel); } @@ -108,6 +107,8 @@ public class CommonChannelController { @RequestParam(required = false) String regionDeviceId, @RequestParam(required = false) String query, @RequestParam(required = false) String type, + @RequestParam(required = false) String ptzType, + @RequestParam(required = false) Boolean online, @RequestParam(required = false) Boolean inGroup, @RequestParam(required = false) Boolean inRegion, @RequestParam(required = true) int page, @@ -125,9 +126,12 @@ public class CommonChannelController { if (type != null && ObjectUtils.isEmpty(type.trim())) { type = null; } + if (ptzType != null && ObjectUtils.isEmpty(ptzType.trim())) { + ptzType = null; + } assert !ObjectUtils.isEmpty(groupDeviceId); return commonGbChannelService.queryChannelListInGroup(page, count, query, groupDeviceId, regionDeviceId, - inGroup, inRegion, type); + inGroup, inRegion, type, ptzType, online); } @Operation(summary = "为区域添加分组")