积水点接口添加注释

This commit is contained in:
wuweida 2022-07-13 10:34:18 +08:00
parent 535d38ce4a
commit 2586f45112
2 changed files with 39 additions and 0 deletions

View File

@ -6,6 +6,9 @@ import com.hisense.monitormanage.dto.WaterPointDtos;
import com.hisense.monitormanage.entity.Result; import com.hisense.monitormanage.entity.Result;
import com.hisense.monitormanage.entity.WaterPoint; import com.hisense.monitormanage.entity.WaterPoint;
import com.hisense.monitormanage.mapper.WaterPointMapper; import com.hisense.monitormanage.mapper.WaterPointMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -15,46 +18,81 @@ import java.util.List;
@RestController @RestController
@RequestMapping("api/project/water") @RequestMapping("api/project/water")
@Api(tags = "积水点")
public class WaterPointController { public class WaterPointController {
@Autowired @Autowired
private WaterPointMapper waterPointMapper; private WaterPointMapper waterPointMapper;
/**
* 查询积水点列表
* @return
*/
@GetMapping("selectWaterPoint") @GetMapping("selectWaterPoint")
@ApiOperation("查询积水点列表")
public Result selectWaterPoint(){ public Result selectWaterPoint(){
List<WaterPointDto> waterPoints = waterPointMapper.selectWaterPoint(); List<WaterPointDto> waterPoints = waterPointMapper.selectWaterPoint();
Result success = Result.success(waterPoints); Result success = Result.success(waterPoints);
return success; return success;
} }
/**
* 查询积水点等级
* @param reportOrigin
* @return
*/
@GetMapping("selectReportOrigin") @GetMapping("selectReportOrigin")
@ApiOperation("查询积水点等级")
@ApiImplicitParam(name = "reportOrigin",value = "等级标识",required = true,dataType = "String")
public Result selectReportOrigin(String reportOrigin){ public Result selectReportOrigin(String reportOrigin){
List<WaterPointDto> waterPoints = waterPointMapper.selectReportOrigin(reportOrigin); List<WaterPointDto> waterPoints = waterPointMapper.selectReportOrigin(reportOrigin);
Result success = Result.success(waterPoints); Result success = Result.success(waterPoints);
return success; return success;
} }
/**
* 根据名称查询积水点详细信息
* @param waterPointName
* @return
*/
@GetMapping("selectCameraByName") @GetMapping("selectCameraByName")
@ApiOperation("根据名称查询积水点详细信息")
@ApiImplicitParam(name = "waterPointName",value = "积水点名称",required = true,dataType = "String")
public Result selectCameraByName(String waterPointName){ public Result selectCameraByName(String waterPointName){
List<WaterCameraDto> waterCameras = waterPointMapper.selectCameraByName(waterPointName); List<WaterCameraDto> waterCameras = waterPointMapper.selectCameraByName(waterPointName);
Result success = Result.success(waterCameras); Result success = Result.success(waterCameras);
return success; return success;
} }
/**
* 统计分析积水点市区分布
* @return
*/
@GetMapping("selectCountWater") @GetMapping("selectCountWater")
@ApiOperation("统计分析积水点市区分布")
public Result selectCountWater(){ public Result selectCountWater(){
List<WaterPointDtos> waterCameras = waterPointMapper.selectCountWater(); List<WaterPointDtos> waterCameras = waterPointMapper.selectCountWater();
Result success = Result.success(waterCameras); Result success = Result.success(waterCameras);
return success; return success;
} }
/**
* 统计分析积水点来源
* @return
*/
@GetMapping("selectCountWaters") @GetMapping("selectCountWaters")
@ApiOperation("统计分析积水点来源")
public Result selectCountWaters(){ public Result selectCountWaters(){
List<WaterPointDtos> waterCameras = waterPointMapper.selectCountWaters(); List<WaterPointDtos> waterCameras = waterPointMapper.selectCountWaters();
Result success = Result.success(waterCameras); Result success = Result.success(waterCameras);
return success; return success;
} }
/**
* 统计分析积水点等级
* @return
*/
@GetMapping("selectCountLevel") @GetMapping("selectCountLevel")
@ApiOperation("统计分析积水点等级")
public Result selectCountLevel(){ public Result selectCountLevel(){
List<WaterPointDtos> waterCameras = waterPointMapper.selectCountLevel(); List<WaterPointDtos> waterCameras = waterPointMapper.selectCountLevel();
Result success = Result.success(waterCameras); Result success = Result.success(waterCameras);

View File

@ -11,4 +11,5 @@ public class WaterCameraDto {
private String videoCapture; private String videoCapture;
private String channelName; private String channelName;
private String channelCode; private String channelCode;
private Integer count;
} }