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 = "为区域添加分组")