修复拉流看方式回显

This commit is contained in:
648540858
2024-07-22 11:07:58 +08:00
parent 0b7d55ed74
commit 2f4d983f9f
5 changed files with 23 additions and 12 deletions

View File

@@ -126,7 +126,7 @@ public class StreamProxyController {
})
@PostMapping(value = "/update")
@ResponseBody
public void update(@RequestBody StreamProxy param){
public StreamProxy update(@RequestBody StreamProxy param){
log.info("更新代理: " + JSONObject.toJSONString(param));
if (param.getId() == 0) {
throw new ControllerException(ErrorCode.ERROR400.getCode(), "缺少代理信息的ID");
@@ -135,6 +135,7 @@ public class StreamProxyController {
param.setGbDeviceId(null);
}
streamProxyService.update(param);
return param;
}
@GetMapping(value = "/ffmpeg_cmd/list")
@@ -170,7 +171,7 @@ public class StreamProxyController {
@Operation(summary = "移除代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "代理ID", required = true)
public void delte(int id){
log.info("移除代理: " + id );
log.info("移除代理: {}", id);
streamProxyService.delete(id);
}
@@ -179,7 +180,7 @@ public class StreamProxyController {
@Operation(summary = "启用代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "id", description = "代理Id", required = true)
public StreamContent start(int id){
log.info("播放代理: " + id);
log.info("播放代理: {}", id);
StreamInfo streamInfo = streamProxyService.start(id);
if (streamInfo == null) {
throw new ControllerException(ErrorCode.ERROR100.getCode(), ErrorCode.ERROR100.getMsg());

View File

@@ -161,9 +161,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
streamProxy.setUpdateTime(DateUtil.getNow());
streamProxyMapper.add(streamProxy);
streamProxy.setStreamProxyId(streamProxy.getId());
if (streamProxy.isEnable()) {
return startProxy(streamProxy);
}
return null;
}

View File

@@ -2,4 +2,4 @@ spring:
application:
name: wvp
profiles:
active: local
active: 272重构