接口优化

This commit is contained in:
wuweida 2022-05-19 09:50:24 +08:00
parent c42d58306c
commit b6c70b0b0e
1 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,7 @@ public class Controller {
private BuildingSiteService buildingSitrService; private BuildingSiteService buildingSitrService;
@RequestMapping("all") @GetMapping("all")
public Object all(){ public Object all(){
List<Project> projects = projectMapper.selectList(null); List<Project> projects = projectMapper.selectList(null);
projects.forEach(project -> { projects.forEach(project -> {
@ -75,7 +75,7 @@ public class Controller {
* 推送给城管接口用的 * 推送给城管接口用的
* @return * @return
*/ */
@RequestMapping("cameras") @GetMapping("cameras")
public Result cameras(){ public Result cameras(){
List<ChengguanDto> chengguanDtos = cameraMapper.selectCamera(); List<ChengguanDto> chengguanDtos = cameraMapper.selectCamera();
Result success = Result.success(chengguanDtos); Result success = Result.success(chengguanDtos);
@ -87,7 +87,7 @@ public class Controller {
* 景区人流识别 * 景区人流识别
* @return * @return
*/ */
@RequestMapping("scenicCamera") @GetMapping("scenicCamera")
public Result scenicCamera(){ public Result scenicCamera(){
List<ScenicCameraDto> scenicCameraDtos = scenicMapper.selectScenicCameras(); List<ScenicCameraDto> scenicCameraDtos = scenicMapper.selectScenicCameras();
Result success = Result.success(scenicCameraDtos); Result success = Result.success(scenicCameraDtos);
@ -95,21 +95,21 @@ public class Controller {
return success; return success;
} }
@RequestMapping("capture") @GetMapping("capture")
public Object capture(){ public Object capture(){
monitorService.start(); monitorService.start();
return "finish capture"; return "finish capture";
} }
@RequestMapping("startScenic") @GetMapping("startScenic")
public Object startScenic(){ public Object startScenic(){
monitorService.startScenic(); monitorService.startScenic();
return "startScenic finish"; return "startScenic finish";
} }
@RequestMapping("capture1") @GetMapping("capture1")
public Object capture1(){ public Object capture1(){
monitorService.start1(); monitorService.start1();