mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-27 15:37:50 +08:00
添加Swagger接口access-token
This commit is contained in:
parent
addb6c0459
commit
ef07cf3b94
@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.vmanager.channel;
|
|||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||||
|
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
|
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
|
||||||
import com.genersoft.iot.vmp.service.ICommonGbChannelService;
|
import com.genersoft.iot.vmp.service.ICommonGbChannelService;
|
||||||
@ -17,6 +18,7 @@ import com.github.pagehelper.PageInfo;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -56,7 +58,7 @@ public class CommonChannelPlatformController {
|
|||||||
/**
|
/**
|
||||||
* 向上级平台添加国标通道
|
* 向上级平台添加国标通道
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "向上级平台添加国标通道")
|
@Operation(summary = "向上级平台添加国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public void addChannelForGB(@RequestBody UpdateChannelParam param) {
|
public void addChannelForGB(@RequestBody UpdateChannelParam param) {
|
||||||
@ -85,7 +87,7 @@ public class CommonChannelPlatformController {
|
|||||||
* @param param 通道关联参数
|
* @param param 通道关联参数
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "从上级平台移除国标通道")
|
@Operation(summary = "从上级平台移除国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public void delChannelForGB(@RequestBody UpdateChannelParam param) {
|
public void delChannelForGB(@RequestBody UpdateChannelParam param) {
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
package com.genersoft.iot.vmp.vmanager.group;
|
package com.genersoft.iot.vmp.vmanager.group;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||||
|
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
||||||
import com.genersoft.iot.vmp.service.IGroupService;
|
import com.genersoft.iot.vmp.service.IGroupService;
|
||||||
import com.genersoft.iot.vmp.service.bean.Group;
|
import com.genersoft.iot.vmp.service.bean.Group;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -26,7 +28,7 @@ public class GroupController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IGroupService groupService;
|
private IGroupService groupService;
|
||||||
|
|
||||||
@Operation(summary = "添加区域")
|
@Operation(summary = "添加区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "group", description = "Group", required = true)
|
@Parameter(name = "group", description = "Group", required = true)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ -34,7 +36,7 @@ public class GroupController {
|
|||||||
groupService.add(group);
|
groupService.add(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "查询区域")
|
@Operation(summary = "查询区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "query", description = "查询内容", required = true)
|
@Parameter(name = "query", description = "查询内容", required = true)
|
||||||
@Parameter(name = "page", description = "当前页", required = true)
|
@Parameter(name = "page", description = "当前页", required = true)
|
||||||
@Parameter(name = "count", description = "每页查询数量", required = true)
|
@Parameter(name = "count", description = "每页查询数量", required = true)
|
||||||
@ -48,7 +50,7 @@ public class GroupController {
|
|||||||
return groupService.queryGroup(query, page, count);
|
return groupService.queryGroup(query, page, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "更新区域")
|
@Operation(summary = "更新区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "group", description = "Group", required = true)
|
@Parameter(name = "group", description = "Group", required = true)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@ -56,7 +58,7 @@ public class GroupController {
|
|||||||
groupService.update(group);
|
groupService.update(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "删除区域")
|
@Operation(summary = "删除区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "groupDeviceId", description = "待删除的节点编号", required = true)
|
@Parameter(name = "groupDeviceId", description = "待删除的节点编号", required = true)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@GetMapping("/delete")
|
@GetMapping("/delete")
|
||||||
@ -68,7 +70,7 @@ public class GroupController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "查询区域的子节点")
|
@Operation(summary = "查询区域的子节点", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "groupParentId", description = "待查询的节点", required = true)
|
@Parameter(name = "groupParentId", description = "待查询的节点", required = true)
|
||||||
@Parameter(name = "page", description = "当前页", required = true)
|
@Parameter(name = "page", description = "当前页", required = true)
|
||||||
@Parameter(name = "count", description = "每页查询数量", required = true)
|
@Parameter(name = "count", description = "每页查询数量", required = true)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.genersoft.iot.vmp.vmanager.region;
|
package com.genersoft.iot.vmp.vmanager.region;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||||
|
import com.genersoft.iot.vmp.conf.security.JwtUtils;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.Gb28181CodeType;
|
import com.genersoft.iot.vmp.gb28181.bean.Gb28181CodeType;
|
||||||
import com.genersoft.iot.vmp.service.IRegionService;
|
import com.genersoft.iot.vmp.service.IRegionService;
|
||||||
import com.genersoft.iot.vmp.service.bean.Region;
|
import com.genersoft.iot.vmp.service.bean.Region;
|
||||||
@ -8,6 +9,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
|||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -27,7 +29,7 @@ public class RegionController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRegionService regionService;
|
private IRegionService regionService;
|
||||||
|
|
||||||
@Operation(summary = "添加区域")
|
@Operation(summary = "添加区域",security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "region", description = "Region", required = true)
|
@Parameter(name = "region", description = "Region", required = true)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ -35,7 +37,7 @@ public class RegionController {
|
|||||||
regionService.add(region);
|
regionService.add(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "查询区域")
|
@Operation(summary = "查询区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "query", description = "要搜索的内容", required = true)
|
@Parameter(name = "query", description = "要搜索的内容", required = true)
|
||||||
@Parameter(name = "page", description = "当前页", required = true)
|
@Parameter(name = "page", description = "当前页", required = true)
|
||||||
@Parameter(name = "count", description = "每页查询数量", required = true)
|
@Parameter(name = "count", description = "每页查询数量", required = true)
|
||||||
@ -49,7 +51,7 @@ public class RegionController {
|
|||||||
return regionService.query(query, page, count);
|
return regionService.query(query, page, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "更新区域")
|
@Operation(summary = "更新区域" , security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "region", description = "Region", required = true)
|
@Parameter(name = "region", description = "Region", required = true)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@ -57,7 +59,7 @@ public class RegionController {
|
|||||||
regionService.update(region);
|
regionService.update(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "删除区域")
|
@Operation(summary = "删除区域" , security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "regionDeviceId", description = "区域编码", required = true)
|
@Parameter(name = "regionDeviceId", description = "区域编码", required = true)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@GetMapping("/delete")
|
@GetMapping("/delete")
|
||||||
@ -69,7 +71,7 @@ public class RegionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "分页区域子节点")
|
@Operation(summary = "分页区域子节点", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "regionParentId", description = "行政区划父节点编号", required = true)
|
@Parameter(name = "regionParentId", description = "行政区划父节点编号", required = true)
|
||||||
@Parameter(name = "page", description = "当前页", required = true)
|
@Parameter(name = "page", description = "当前页", required = true)
|
||||||
@Parameter(name = "count", description = "每页查询数量", required = true)
|
@Parameter(name = "count", description = "每页查询数量", required = true)
|
||||||
@ -86,7 +88,7 @@ public class RegionController {
|
|||||||
return regionService.queryChildRegionList(regionParentId, page, count);
|
return regionService.queryChildRegionList(regionParentId, page, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "根据区域Id查询区域")
|
@Operation(summary = "根据区域Id查询区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "regionDeviceId", description = "行政区划节点编号", required = true)
|
@Parameter(name = "regionDeviceId", description = "行政区划节点编号", required = true)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@GetMapping("/one")
|
@GetMapping("/one")
|
||||||
@ -99,7 +101,7 @@ public class RegionController {
|
|||||||
return regionService.queryRegionByDeviceId(regionDeviceId);
|
return regionService.queryRegionByDeviceId(regionDeviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取所属的行政区划下的行政区划")
|
@Operation(summary = "获取所属的行政区划下的行政区划", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "parent", description = "所属的行政区划", required = false)
|
@Parameter(name = "parent", description = "所属的行政区划", required = false)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@GetMapping("/base/child/list")
|
@GetMapping("/base/child/list")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user