|
@@ -23,7 +23,7 @@ import java.util.List;
|
|
|
|
|
|
@Api(tags = "相机设备")
|
|
|
@RestController
|
|
|
-@RequestMapping(value = "/camera")
|
|
|
+@RequestMapping(value = "api/camera")
|
|
|
public class CameraController {
|
|
|
|
|
|
@Autowired
|
|
@@ -31,7 +31,7 @@ public class CameraController {
|
|
|
|
|
|
|
|
|
@ApiOperation("相机设备分页信息")
|
|
|
- @PostMapping("/list")
|
|
|
+ @GetMapping("/list")
|
|
|
public AjaxResult list(@Validated PageValidate pageValidate,
|
|
|
@Validated Camera camera) {
|
|
|
PageHelper.startPage(pageValidate.getPageNo(),pageValidate.getPageSize());
|
|
@@ -42,7 +42,7 @@ public class CameraController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "cameraId", value = "相机设备Id", paramType = "query", dataType = "Long"),
|
|
|
})
|
|
|
- @PostMapping("/detail")
|
|
|
+ @GetMapping("/detail")
|
|
|
public AjaxResult detail(Long cameraId) {
|
|
|
return AjaxResult.success(cameraService.getById(cameraId));
|
|
|
}
|
|
@@ -75,7 +75,7 @@ public class CameraController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "id", value = "设备id", paramType = "query", dataType = "Long")
|
|
|
})
|
|
|
- @PostMapping("/getChannel")
|
|
|
+ @GetMapping("/getChannel")
|
|
|
public AjaxResult getChannel(Long id) {
|
|
|
CameraDTO cameraDTO = new CameraDTO();
|
|
|
cameraDTO.setId(id);
|
|
@@ -87,7 +87,7 @@ public class CameraController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "id", value = "设备id", paramType = "query", dataType = "Long")
|
|
|
})
|
|
|
- @PostMapping("/startTranscodeList")
|
|
|
+ @GetMapping("/startTranscodeList")
|
|
|
public AjaxResult startTranscodeList() {
|
|
|
// CameraDTO cameraDTO = new CameraDTO();
|
|
|
// cameraDTO.setId(id);
|
|
@@ -99,7 +99,7 @@ public class CameraController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "id", value = "设备id", paramType = "query", dataType = "Long")
|
|
|
})
|
|
|
- @PostMapping("/startTranscode")
|
|
|
+ @GetMapping("/startTranscode")
|
|
|
public AjaxResult startTranscode(Long id) {
|
|
|
CameraDTO cameraDTO = new CameraDTO();
|
|
|
cameraDTO.setId(id);
|
|
@@ -118,7 +118,7 @@ public class CameraController {
|
|
|
@ApiImplicitParam(name = "startTime", value = "起始时间", paramType = "query", dataType = "Date"),
|
|
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "Date")
|
|
|
})
|
|
|
- @PostMapping("/startBackTranscode")
|
|
|
+ @GetMapping("/startBackTranscode")
|
|
|
public AjaxResult startBackTranscode(Long id,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime,
|
|
|
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime) {
|
|
@@ -138,7 +138,7 @@ public class CameraController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "id", value = "设备id", paramType = "query", dataType = "Long"),
|
|
|
})
|
|
|
- @PostMapping("/catchPic")
|
|
|
+ @GetMapping("/catchPic")
|
|
|
public AjaxResult catchPic(Long id){
|
|
|
CameraDTO cameraDTO = new CameraDTO();
|
|
|
cameraDTO.setId(id);
|
|
@@ -193,11 +193,11 @@ public class CameraController {
|
|
|
* @param id 相机id
|
|
|
* @return Boolean
|
|
|
*/
|
|
|
- @ApiOperation("关闭进程")
|
|
|
+ @ApiOperation("ID关闭进程")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "id", value = "FlowId", paramType = "query", dataType = "Long")
|
|
|
})
|
|
|
- @PostMapping("/stopRtmp")
|
|
|
+ @GetMapping("/stopRtmp")
|
|
|
public AjaxResult stopRtmp(Long id){
|
|
|
Boolean result = cameraService.stopRtmp(id);
|
|
|
return AjaxResult.success(result);
|
|
@@ -212,7 +212,7 @@ public class CameraController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "taskName", value = "taskName", paramType = "query", dataType = "String")
|
|
|
})
|
|
|
- @PostMapping("/stopRtmpByTaskName")
|
|
|
+ @GetMapping("/stopRtmpByTaskName")
|
|
|
public AjaxResult stopRtmpByTaskName(String taskName){
|
|
|
Boolean result = cameraService.stopRtmpByTaskName(taskName);
|
|
|
return AjaxResult.success(result);
|
|
@@ -227,7 +227,7 @@ public class CameraController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "ip", value = "ip", paramType = "query", dataType = "String")
|
|
|
})
|
|
|
- @PostMapping("/stopRtmpByIP")
|
|
|
+ @GetMapping("/stopRtmpByIP")
|
|
|
public AjaxResult stopRtmpByIP(String ip){
|
|
|
Boolean result = cameraService.stopRtmpByIP(ip);
|
|
|
return AjaxResult.success(result);
|
|
@@ -242,7 +242,7 @@ public class CameraController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "id", value = "设备id", paramType = "query", dataType = "Long"),
|
|
|
})
|
|
|
- @GetMapping("/getState")
|
|
|
+ @GetMapping("/getStatus")
|
|
|
public AjaxResult getState(Long id) {
|
|
|
CameraDTO cameraDTO = new CameraDTO();
|
|
|
cameraDTO.setId(id);
|