增加全部球机 全部巷道街道

merge-requests/3/head
qiushui 4 years ago
parent 17e3bbdf07
commit 2df8219ba0

@ -2,7 +2,9 @@ package com.zhehekeji.web.controller;
import com.zhehekeji.core.pojo.Result;
import com.zhehekeji.web.config.ConfigProperties;
import com.zhehekeji.web.entity.Camera;
import com.zhehekeji.web.pojo.realTime.RealTime;
import com.zhehekeji.web.service.CameraService;
import com.zhehekeji.web.service.RealTimeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -20,6 +22,8 @@ public class RealTimeController {
private RealTimeService realTimeService;
@Resource
private ConfigProperties configProperties;
@Resource
private CameraService cameraService;
@PostMapping("")
@ApiOperation(value = "实时列表")
@ -28,6 +32,13 @@ public class RealTimeController {
return Result.success(realTimeService.realTimes());
}
@GetMapping("/allCameras")
@ApiOperation(value = "全部球机")
//@SessionHandler
public Result<List<Camera>> allCameras() {
return Result.success(cameraService.allCameras());
}
@GetMapping("/videoServer")
@ApiOperation(value = "视频服务器地址")
public Result<String> getVideoServer(){

@ -11,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@Api(value = "StreetController",tags = "巷道管理")
@RestController(value = "StreetController")
@ -28,6 +29,13 @@ public class StreetController {
return new Result<>(streetService.page(search));
}
@GetMapping("/list")
@ApiOperation(value = "全部巷道")
//@SessionHandler
public Result<List<StreetVO>> list() {
return new Result(streetService.list());
}
@PostMapping("")
@ApiOperation(value = "巷道新增")
public Result add(@RequestBody Street street){

@ -87,6 +87,10 @@ public class CameraService {
return new PageInfo<>(cameras);
}
public List<Camera> allCameras(){
return cameraMapper.selectByMap(new HashMap<>());
}
/**
* IO
*

@ -151,4 +151,8 @@ public class StreetService {
return new PageInfo<>(streetVOS);
}
public List<StreetVO> list(){
return streetMapper.list();
}
}

Loading…
Cancel
Save