From 0cacf6c8fa09475eeaedadfa622b20677df708b9 Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Tue, 17 May 2022 13:59:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0swagger=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monitormanage/controller/Controller.java | 39 ++++++++++++------- .../controller/ShangTangController.java | 3 ++ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/hisense/monitormanage/controller/Controller.java b/src/main/java/com/hisense/monitormanage/controller/Controller.java index 53d84e4..2c5bc52 100644 --- a/src/main/java/com/hisense/monitormanage/controller/Controller.java +++ b/src/main/java/com/hisense/monitormanage/controller/Controller.java @@ -122,11 +122,10 @@ public class Controller { * @param * @return */ - @RequestMapping("selectAll") + @GetMapping("selectAll") + @ApiOperation("查询所有摄像头") public String selectAll(){ - return cameraChannelService.selectAll(); - } /** @@ -134,7 +133,9 @@ public class Controller { * @param channelCode * @return */ - @RequestMapping("selectByChannelCode") + @GetMapping("selectByChannelCode") + @ApiOperation("根据channelCode查询摄像头详细信息") + @ApiImplicitParam(name = "channelCode",value = "摄像头标识",required = true,dataType = "String") public Result selectByChannelCode(String channelCode){ List list = cameraChannelMapper.selectByChannelCode(channelCode); @@ -151,7 +152,9 @@ public class Controller { * @param channelName * @return */ - @RequestMapping("selectByChannelName") + @GetMapping("selectByChannelName") + @ApiOperation("根据摄像头名字模糊查询摄像头") + @ApiImplicitParam(name = "channelName",value = "摄像头名称",required = true,dataType = "String") public Result selectByChannelName(String channelName){ List labels = cameraChannelMapper.selectByChannelName(channelName); @@ -162,11 +165,16 @@ public class Controller { } /** - * 根据parentId查询摄像头 + * 根据parentId和checkStatus查询摄像头 * @param parentId * @return */ - @RequestMapping("selectByParentId") + @GetMapping("selectByParentId") + @ApiOperation("根据parentId和checkStatus查询摄像头") + @ApiImplicitParams({ + @ApiImplicitParam(name = "parentId",value = "摄像头的组织Id",required = true,dataType = "String"), + @ApiImplicitParam(name = "checkStatus",value = "异常状态 1正常,0异常",required = true,dataType = "String") + }) public Result selectByParentId(String parentId,String checkStatus){ List list = cameraChannelMapper.selectByParentId(parentId,checkStatus); @@ -181,7 +189,9 @@ public class Controller { * 根据标签查询对应摄像头 * @return */ - @RequestMapping("selectLabel") + @GetMapping("selectLabel") + @ApiOperation("根据标签查询对应摄像头") + @ApiImplicitParam(name = "labelCode",value = "标签号",required = true,dataType = "String") public Result selectLabel(String labelCode){ List channelLabelDtos = cameraChannelMapper.selectLabel(labelCode); @@ -205,7 +215,7 @@ public class Controller { * @param gpsY1 * @return */ - @RequestMapping("selectAllByGps") + @GetMapping ("selectAllByGps") public Result selectAllByGps(String gpsX,String gpsX1,String gpsY,String gpsY1){ List gps = cameraChannelMapper.selectAllByGps(gpsX, gpsX1, gpsY, gpsY1); @@ -224,7 +234,8 @@ public class Controller { * @param label * @return */ - @RequestMapping("selectAllLabel") + @GetMapping("selectAllLabel") + @ApiOperation("查询所有标签") public Result selectAllLabel(Label label ){ List