1、修改swagger的相关注解

This commit is contained in:
yitonglei 2022-05-17 13:14:59 +08:00
parent f7b023478e
commit 4cf8203977
4 changed files with 34 additions and 20 deletions

View File

@ -373,11 +373,11 @@ public class Controller {
@GetMapping(value = "listSedimentTrailByPoints")
@ApiOperation("渣土车轨迹信息,根据经纬度和半径从表中查询")
@ApiImplicitParams({
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "Integer"),
@ApiImplicitParam(name = "start", value = "开始时间2021-08-03 10:17:23", paramType = "String"),
@ApiImplicitParam(name = "end", value = "结束时间2021-08-03 12:17:23", paramType = "String")
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = true,dataType ="Integer"),
@ApiImplicitParam(name = "start", value = "开始时间2021-08-03 10:17:23", paramType = "query",required = true,dataType ="string"),
@ApiImplicitParam(name = "end", value = "结束时间2021-08-03 12:17:23", paramType = "query",required = true,dataType ="string")
})
public Result listSedimentTrailByPoints(
@RequestParam(value="longitude") double longitude,
@ -400,7 +400,7 @@ public class Controller {
//获取最新的实时客流列表从表获取
@GetMapping("listPassengerFlow")
@ApiOperation("获取最新的实时客流列表,从表获取")
@ApiOperation("获取最新的实时客流列表,从表获取,热力图")
public List<PassengerFlow> listPassengerFlow(){
List<PassengerFlow> list = passengerFlowService.listPassengerFlow();
return list;
@ -423,10 +423,10 @@ public class Controller {
@GetMapping("getPassengerNum")
@ApiOperation("查询游客总数根据经纬度和半径米、timeId从表中查询")
@ApiImplicitParams({
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "Integer"),
@ApiImplicitParam(name = "timeId", value = "时间点202205101600", paramType = "String"),
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = true,dataType ="Integer"),
@ApiImplicitParam(name = "timeId", value = "时间点202205101600", paramType = "query",required = true,dataType ="string"),
})
public Result getPassengerNum(
@RequestParam(value="longitude") double longitude,
@ -453,11 +453,11 @@ public class Controller {
@GetMapping(value = "listTrailSanitationByPoints")
@ApiOperation("查询范围内环卫车轨迹信息,根据经纬度、半径米,时间从表中查询")
@ApiImplicitParams({
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "Integer"),
@ApiImplicitParam(name = "start", value = "开始时间2021-03-17 00:00:00", paramType = "String"),
@ApiImplicitParam(name = "end", value = "结束时间2021-03-22 00:00:00", paramType = "String"),
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = true,dataType ="Integer"),
@ApiImplicitParam(name = "start", value = "开始时间2021-03-17 00:00:00", paramType = "query",required = true,dataType ="string"),
@ApiImplicitParam(name = "end", value = "结束时间2021-03-22 00:00:00", paramType = "query",required = true,dataType ="string"),
})
public Result listTrailSanitationByPoints(
@RequestParam(value="longitude") double longitude,
@ -474,6 +474,7 @@ public class Controller {
//输入参考2022-05-10 00:00:00只能查询当前日期前一天及以前的
@GetMapping(value="listRoadData")
@ApiOperation("查询道路污染数据,根据dt从表中查询参考输入-2022-05-10 00:00:00只能查询当前日期前一天及以前的")
@ApiImplicitParam(name="dt",value = "时间",paramType = "query",required = true,dataType = "string")
public Result listRoadData(@RequestParam(value="dt") String dt){
List<RoadData> list = roadDataService.listRoadData(dt);
return Result.success(list);
@ -482,6 +483,10 @@ public class Controller {
//查询工地信息根据经纬度和半径查询
@GetMapping(value = "listBuildingSiteByPoints")
@ApiOperation("查询工地信息,根据经纬度和半径从表中查询")
@ApiImplicitParams({
@ApiImplicitParam(name="longitude",value = "经度",paramType = "query",required = true,dataType = "double"),
@ApiImplicitParam(name="longitude",value = "经度",paramType = "query",required = true,dataType = "double")
})
public Result listBuildingSiteByPoints(double longitude,double latitude,Integer raidus){
List<BuildingSite> list = new ArrayList<>();
list = buildingSitrService.listBuildingSiteByPoints(longitude,latitude,raidus);

View File

@ -3,10 +3,12 @@ package com.hisense.monitormanage.controller;
import com.hisense.monitormanage.entity.CaseCityLaw;
import com.hisense.monitormanage.service.SJZTService;
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.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@ -20,21 +22,26 @@ public class SJZTController {
private SJZTService sjztService;
//从接口获取案件数据
@ApiOperation("从接口获取案件数据")
@GetMapping("listSJZTDatas")
@ApiOperation("获取案件数据,根据后台条件调用接口获取")
public List<Map> listSJZTDatas(){
return sjztService.listSJZTDatas();
}
//测试保存
@GetMapping("batchSaveSJZT")
@ApiOperation("测试保存,根据后台条件调用接口获取并保存到表,这个后台条件需要改动,也可能是做成自动任务调度")
public void batchSaveSJZT(){
sjztService.batchSave();
}
//从表中查询案件数据,需要根据要求增加条件
@GetMapping("listSJZT")
public List<CaseCityLaw> listSJZT(){
return sjztService.listSJZT();
@GetMapping("listSJZTByDt")
@ApiOperation("获取案件数据根据ajjlsj从表中获取")
@ApiImplicitParam(name="ajjlsj",value="案件建立时间2021-01-01",paramType = "query",required = true,dataType = "string")
public List<CaseCityLaw> listSJZTByDt(
@RequestParam(value="ajjlsj") String ajjlsj
){
return sjztService.listSJZTByDt(ajjlsj);
}
}

View File

@ -13,6 +13,7 @@ import com.hisense.monitormanage.mapper.CameraMapper;
import com.hisense.monitormanage.mapper.ProjectMapper;
import com.hisense.monitormanage.mapper.ScenicMapper;
import com.hisense.monitormanage.service.MonitorService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

View File

@ -171,8 +171,9 @@ public class SJZTService {
}
public List<CaseCityLaw> listSJZT(){
public List<CaseCityLaw> listSJZTByDt(String ajjlsj){
QueryWrapper<CaseCityLaw> wrapper = new QueryWrapper<>();
wrapper.like("ajjlsj",ajjlsj);
return caseCityLawMapper.selectList(wrapper);
}