定义第三方接口信息

This commit is contained in:
lin 2025-09-30 20:31:48 +08:00
parent eff1773101
commit 4aeca7f5dd
2 changed files with 8 additions and 28 deletions

View File

@ -37,7 +37,6 @@ public class CameraChannelController {
@Parameter(name = "sortName", description = "排序字段名") @Parameter(name = "sortName", description = "排序字段名")
@Parameter(name = "order", description = "排序方式(升序 asc 或降序 desc ") @Parameter(name = "order", description = "排序方式(升序 asc 或降序 desc ")
@Parameter(name = "groupAlias", description = "分组别名") @Parameter(name = "groupAlias", description = "分组别名")
@Parameter(name = "topGroupAlias", description = "虚拟组织别名")
@Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09") @Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09")
@Parameter(name = "status", description = "摄像头状态") @Parameter(name = "status", description = "摄像头状态")
@Parameter(name = "containMobileDevice", description = "是否包含移动设备") @Parameter(name = "containMobileDevice", description = "是否包含移动设备")
@ -47,7 +46,6 @@ public class CameraChannelController {
@RequestParam(required = false) String sortName, @RequestParam(required = false) String sortName,
@RequestParam(required = false) String order, @RequestParam(required = false) String order,
@RequestParam(required = false) String groupAlias, @RequestParam(required = false) String groupAlias,
@RequestParam(required = false) String topGroupAlias,
@RequestParam(required = false) Boolean status, @RequestParam(required = false) Boolean status,
@RequestParam(required = false) Boolean containMobileDevice){ @RequestParam(required = false) Boolean containMobileDevice){
if (ObjectUtils.isEmpty(query)) { if (ObjectUtils.isEmpty(query)) {
@ -62,11 +60,8 @@ public class CameraChannelController {
if (ObjectUtils.isEmpty(groupAlias)) { if (ObjectUtils.isEmpty(groupAlias)) {
groupAlias = null; groupAlias = null;
} }
if (ObjectUtils.isEmpty(topGroupAlias)) {
topGroupAlias = null;
}
return channelService.queryList(page, count, query, sortName, order, groupAlias, topGroupAlias, status, containMobileDevice); return channelService.queryList(page, count, query, sortName, order, groupAlias, status, containMobileDevice);
} }
@GetMapping(value = "/camera/list") @GetMapping(value = "/camera/list")
@ -78,7 +73,6 @@ public class CameraChannelController {
@Parameter(name = "sortName", description = "排序字段名") @Parameter(name = "sortName", description = "排序字段名")
@Parameter(name = "order", description = "排序方式(升序 asc 或降序 desc ") @Parameter(name = "order", description = "排序方式(升序 asc 或降序 desc ")
@Parameter(name = "groupAlias", description = "分组别名") @Parameter(name = "groupAlias", description = "分组别名")
@Parameter(name = "topGroupAlias", description = "虚拟组织别名")
@Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09") @Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09")
@Parameter(name = "status", description = "摄像头状态") @Parameter(name = "status", description = "摄像头状态")
@Parameter(name = "containMobileDevice", description = "是否包含移动设备") @Parameter(name = "containMobileDevice", description = "是否包含移动设备")
@ -88,7 +82,6 @@ public class CameraChannelController {
@RequestParam(required = false) String sortName, @RequestParam(required = false) String sortName,
@RequestParam(required = false) String order, @RequestParam(required = false) String order,
@RequestParam(required = false) String groupAlias, @RequestParam(required = false) String groupAlias,
@RequestParam(required = false) String topGroupAlias,
@RequestParam(required = false) Boolean status, @RequestParam(required = false) Boolean status,
@RequestParam(required = false) Boolean containMobileDevice){ @RequestParam(required = false) Boolean containMobileDevice){
if (ObjectUtils.isEmpty(query)) { if (ObjectUtils.isEmpty(query)) {
@ -103,11 +96,8 @@ public class CameraChannelController {
if (ObjectUtils.isEmpty(groupAlias)) { if (ObjectUtils.isEmpty(groupAlias)) {
groupAlias = null; groupAlias = null;
} }
if (ObjectUtils.isEmpty(topGroupAlias)) {
topGroupAlias = null;
}
return channelService.queryList(page, count, query, sortName, order, groupAlias, topGroupAlias, status, containMobileDevice); return channelService.queryList(page, count, query, sortName, order, groupAlias, status, containMobileDevice);
} }
@GetMapping(value = "/camera/one") @GetMapping(value = "/camera/one")
@ -153,12 +143,11 @@ public class CameraChannelController {
@Parameter(name = "maxLatitude", description = "最大纬度") @Parameter(name = "maxLatitude", description = "最大纬度")
@Parameter(name = "level", description = "地图级别") @Parameter(name = "level", description = "地图级别")
@Parameter(name = "groupAlias", description = "分组别名") @Parameter(name = "groupAlias", description = "分组别名")
@Parameter(name = "topGroupAlias", description = "虚拟组织别名")
@Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09") @Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09")
public List<CameraChannel> queryListInBox(Double minLongitude, Double maxLongitude, public List<CameraChannel> queryListInBox(Double minLongitude, Double maxLongitude,
Double minLatitude, Double maxLatitude, Double minLatitude, Double maxLatitude,
@RequestParam(required = false) Integer level, @RequestParam(required = false) Integer level,
String groupAlias, String topGroupAlias, String groupAlias,
@RequestParam(required = false) String geoCoordSys) { @RequestParam(required = false) String geoCoordSys) {
return null; return null;
} }
@ -169,7 +158,6 @@ public class CameraChannelController {
@Parameter(name = "position", description = "多边形位置,格式: [{'lng':116.32, 'lat': 39: 39.2}, {'lng':115.32, 'lat': 39: 38.2}, {'lng':125.32, 'lat': 39: 38.2}]") @Parameter(name = "position", description = "多边形位置,格式: [{'lng':116.32, 'lat': 39: 39.2}, {'lng':115.32, 'lat': 39: 38.2}, {'lng':125.32, 'lat': 39: 38.2}]")
@Parameter(name = "level", description = "地图级别") @Parameter(name = "level", description = "地图级别")
@Parameter(name = "groupAlias", description = "分组别名") @Parameter(name = "groupAlias", description = "分组别名")
@Parameter(name = "topGroupAlias", description = "虚拟组织别名")
@Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09") @Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09")
public List<CameraChannel> queryListInPolygon(@RequestBody PolygonQueryParam param) { public List<CameraChannel> queryListInPolygon(@RequestBody PolygonQueryParam param) {
return null; return null;
@ -182,10 +170,9 @@ public class CameraChannelController {
@Parameter(name = "centerLatitude", description = "圆心纬度") @Parameter(name = "centerLatitude", description = "圆心纬度")
@Parameter(name = "radius", description = "查询范围的半径,单位米") @Parameter(name = "radius", description = "查询范围的半径,单位米")
@Parameter(name = "groupAlias", description = "分组别名") @Parameter(name = "groupAlias", description = "分组别名")
@Parameter(name = "topGroupAlias", description = "虚拟组织别名")
@Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09") @Parameter(name = "geoCoordSys", description = "坐标系类型WGS84,GCJ02、BD09")
public List<CameraChannel> queryListInCircle(Double centerLongitude, Double centerLatitude, Double radius, String groupAlias, public List<CameraChannel> queryListInCircle(Double centerLongitude, Double centerLatitude, Double radius, String groupAlias,
String topGroupAlias, String geoCoordSys) { String geoCoordSys) {
return null; return null;
} }

View File

@ -34,19 +34,12 @@ public class CameraChannelService implements CommandLineRunner {
} }
public PageInfo<CameraChannel> queryList(Integer page, Integer count, String query, String sortName, String order, String groupAlias, String topGroupAlias, Boolean status, Boolean containMobileDevice) { public PageInfo<CameraChannel> queryList(Integer page, Integer count, String query, String sortName, String order, String groupAlias, Boolean status, Boolean containMobileDevice) {
// 构建组织结构信息 // 构建组织结构信息
String groupDeviceId = null; Group group = groupMapper.queryGroupByAlias(groupAlias);
if (topGroupAlias != null && groupAlias != null) { Assert.notNull(group, "获取组织结构失败");
// 根据别名获取分组信息 String groupDeviceId = group.getDeviceId();
Group businessGroup = groupMapper.queryGroupByAlias(topGroupAlias);
Assert.notNull(businessGroup, "域信息未找到");
Group group = groupMapper.queryGroupByAliasAndBusinessGroup(groupAlias, businessGroup.getDeviceId());
Assert.notNull(businessGroup, "获取组织结构失败");
groupDeviceId = group.getDeviceId();
}
// 构建分页 // 构建分页
PageHelper.startPage(page, count); PageHelper.startPage(page, count);