统一axios写法
This commit is contained in:
@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
@@ -25,11 +26,11 @@ public class SseController {
|
||||
@Autowired
|
||||
AlarmEventListener alarmEventListener;
|
||||
|
||||
@ApiOperation("设置响应")
|
||||
@ApiOperation("浏览器推送")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "browserId", value = "浏览器ID", dataTypeClass = String.class),
|
||||
})
|
||||
@RequestMapping("/emit")
|
||||
@PostMapping("/emit")
|
||||
public SseEmitter emit(@RequestParam String browserId) {
|
||||
final SseEmitter sseEmitter = new SseEmitter(0L);
|
||||
try {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class MediaController {
|
||||
@ApiImplicitParam(name = "app", value = "应用名", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "stream", value = "流id", dataTypeClass = String.class),
|
||||
})
|
||||
@RequestMapping(value = "/getStreamInfoByAppAndStream")
|
||||
@GetMapping(value = "/stream_info_by_app_and_stream")
|
||||
@ResponseBody
|
||||
public StreamInfo getStreamInfoByAppAndStream(String app, String stream){
|
||||
return mediaService.getStreamInfoByAppAndStreamWithCheck(app, stream);
|
||||
|
||||
@@ -32,7 +32,7 @@ public class PlatformGbStreamController {
|
||||
@ApiImplicitParam(name = "page", value = "当前页", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "count", value = "每页条数", dataTypeClass = Integer.class),
|
||||
})
|
||||
@RequestMapping(value = "/list")
|
||||
@GetMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public PageInfo<GbStream> list(@RequestParam(required = false)Integer page,
|
||||
@RequestParam(required = false)Integer count){
|
||||
|
||||
@@ -93,7 +93,7 @@ public class PlayController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "streamId", value = "视频流ID", dataTypeClass = String.class),
|
||||
})
|
||||
@PostMapping("/stop/{streamId}")
|
||||
@GetMapping("/stop/{streamId}")
|
||||
public DeferredResult<ResponseEntity<String>> playStop(@PathVariable String streamId) {
|
||||
|
||||
logger.debug(String.format("设备预览/回放停止API调用,streamId:%s", streamId));
|
||||
|
||||
@@ -105,7 +105,7 @@ public class PlaybackController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "ssrc", value = "视频流标识", dataTypeClass = String.class),
|
||||
})
|
||||
@RequestMapping("/stop/{ssrc}")
|
||||
@GetMapping("/stop/{ssrc}")
|
||||
public ResponseEntity<String> playStop(@PathVariable String ssrc) {
|
||||
|
||||
cmder.streamByeCmd(ssrc);
|
||||
|
||||
Reference in New Issue
Block a user