优化通用通道接口
parent
25a46d1833
commit
e2fd8ddf8b
|
@ -31,7 +31,7 @@ public interface ICommonGbChannelService {
|
||||||
|
|
||||||
PageInfo<CommonGbChannel> queryChannelListInGroup(int page, int count, String query, String groupDeviceId,
|
PageInfo<CommonGbChannel> queryChannelListInGroup(int page, int count, String query, String groupDeviceId,
|
||||||
String regionDeviceId, Boolean inGroup, Boolean inRegion,
|
String regionDeviceId, Boolean inGroup, Boolean inRegion,
|
||||||
String type);
|
String type, String ptzType, Boolean online);
|
||||||
|
|
||||||
PageInfo<CommonGbChannel> queryChannelList(String query, int page, int count);
|
PageInfo<CommonGbChannel> queryChannelList(String query, int page, int count);
|
||||||
|
|
||||||
|
|
|
@ -137,8 +137,11 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<CommonGbChannel> queryChannelListInGroup(int page, int count, String query, String groupDeviceId,
|
public PageInfo<CommonGbChannel> queryChannelListInGroup(int page, int count, String query, String groupDeviceId,
|
||||||
String regionDeviceId, Boolean inGroup, Boolean inRegion,
|
String regionDeviceId, Boolean inGroup, Boolean inRegion,
|
||||||
String type) {
|
String type, String ptzType, Boolean online) {
|
||||||
PageHelper.startPage(page, count);
|
PageHelper.startPage(page, count);
|
||||||
|
if (query != null && ObjectUtils.isEmpty(query.trim())) {
|
||||||
|
query = null;
|
||||||
|
}
|
||||||
if (groupDeviceId != null && ObjectUtils.isEmpty(groupDeviceId.trim())) {
|
if (groupDeviceId != null && ObjectUtils.isEmpty(groupDeviceId.trim())) {
|
||||||
inGroup = null;
|
inGroup = null;
|
||||||
}
|
}
|
||||||
|
@ -148,6 +151,9 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
|
||||||
if (type != null && ObjectUtils.isEmpty(type.trim())) {
|
if (type != null && ObjectUtils.isEmpty(type.trim())) {
|
||||||
type = null;
|
type = null;
|
||||||
}
|
}
|
||||||
|
if (ptzType != null && ObjectUtils.isEmpty(ptzType.trim())) {
|
||||||
|
ptzType = null;
|
||||||
|
}
|
||||||
List<CommonGbChannel> all = commonGbChannelMapper.queryChannelListInGroup(query, groupDeviceId,
|
List<CommonGbChannel> all = commonGbChannelMapper.queryChannelListInGroup(query, groupDeviceId,
|
||||||
regionDeviceId, inGroup, inRegion, type);
|
regionDeviceId, inGroup, inRegion, type);
|
||||||
return new PageInfo<>(all);
|
return new PageInfo<>(all);
|
||||||
|
|
|
@ -54,9 +54,8 @@ public class CommonChannelController {
|
||||||
@Operation(summary = "更新通道信息")
|
@Operation(summary = "更新通道信息")
|
||||||
@Parameter(name = "CommonGbChannel", description = "commonGbChannel", required = true)
|
@Parameter(name = "CommonGbChannel", description = "commonGbChannel", required = true)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@GetMapping("/update")
|
@PostMapping("/update")
|
||||||
public void update(
|
public void update(@RequestBody CommonGbChannel commonGbChannel
|
||||||
@RequestParam(required = false) CommonGbChannel commonGbChannel
|
|
||||||
){
|
){
|
||||||
commonGbChannelService.update(commonGbChannel);
|
commonGbChannelService.update(commonGbChannel);
|
||||||
}
|
}
|
||||||
|
@ -108,6 +107,8 @@ public class CommonChannelController {
|
||||||
@RequestParam(required = false) String regionDeviceId,
|
@RequestParam(required = false) String regionDeviceId,
|
||||||
@RequestParam(required = false) String query,
|
@RequestParam(required = false) String query,
|
||||||
@RequestParam(required = false) String type,
|
@RequestParam(required = false) String type,
|
||||||
|
@RequestParam(required = false) String ptzType,
|
||||||
|
@RequestParam(required = false) Boolean online,
|
||||||
@RequestParam(required = false) Boolean inGroup,
|
@RequestParam(required = false) Boolean inGroup,
|
||||||
@RequestParam(required = false) Boolean inRegion,
|
@RequestParam(required = false) Boolean inRegion,
|
||||||
@RequestParam(required = true) int page,
|
@RequestParam(required = true) int page,
|
||||||
|
@ -125,9 +126,12 @@ public class CommonChannelController {
|
||||||
if (type != null && ObjectUtils.isEmpty(type.trim())) {
|
if (type != null && ObjectUtils.isEmpty(type.trim())) {
|
||||||
type = null;
|
type = null;
|
||||||
}
|
}
|
||||||
|
if (ptzType != null && ObjectUtils.isEmpty(ptzType.trim())) {
|
||||||
|
ptzType = null;
|
||||||
|
}
|
||||||
assert !ObjectUtils.isEmpty(groupDeviceId);
|
assert !ObjectUtils.isEmpty(groupDeviceId);
|
||||||
return commonGbChannelService.queryChannelListInGroup(page, count, query, groupDeviceId, regionDeviceId,
|
return commonGbChannelService.queryChannelListInGroup(page, count, query, groupDeviceId, regionDeviceId,
|
||||||
inGroup, inRegion, type);
|
inGroup, inRegion, type, ptzType, online);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "为区域添加分组")
|
@Operation(summary = "为区域添加分组")
|
||||||
|
|
Loading…
Reference in New Issue