临时提交
parent
9f4e66a38b
commit
1dc0cb0c83
|
@ -165,13 +165,13 @@ public class StreamProxyController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping(value = "/delte")
|
@DeleteMapping(value = "/delete")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Operation(summary = "移除代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
@Operation(summary = "移除代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "id", description = "代理ID", required = true)
|
@Parameter(name = "id", description = "代理ID", required = true)
|
||||||
public void delte(int id){
|
public void delte(int id){
|
||||||
log.info("移除代理: " + id );
|
log.info("移除代理: " + id );
|
||||||
streamProxyService.delte(id);
|
streamProxyService.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/start")
|
@GetMapping(value = "/start")
|
||||||
|
|
|
@ -91,7 +91,7 @@ public interface IStreamProxyService {
|
||||||
|
|
||||||
StreamProxy getStreamProxy(int id);
|
StreamProxy getStreamProxy(int id);
|
||||||
|
|
||||||
void delte(int id);
|
void delete(int id);
|
||||||
|
|
||||||
boolean start(int id);
|
boolean start(int id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,15 +168,15 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delte(int id) {
|
public void delete(int id) {
|
||||||
StreamProxy streamProxy = getStreamProxy(id);
|
StreamProxy streamProxy = getStreamProxy(id);
|
||||||
if (streamProxy == null) {
|
if (streamProxy == null) {
|
||||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "代理不存在");
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "代理不存在");
|
||||||
}
|
}
|
||||||
delte(streamProxy);
|
delete(streamProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void delte(StreamProxy streamProxy) {
|
private void delete(StreamProxy streamProxy) {
|
||||||
if (streamProxy.getPulling()) {
|
if (streamProxy.getPulling()) {
|
||||||
stopProxy(streamProxy);
|
stopProxy(streamProxy);
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||||
if (streamProxy == null) {
|
if (streamProxy == null) {
|
||||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "代理不存在");
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "代理不存在");
|
||||||
}
|
}
|
||||||
delte(streamProxy);
|
delete(streamProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,4 +2,4 @@ spring:
|
||||||
application:
|
application:
|
||||||
name: wvp
|
name: wvp
|
||||||
profiles:
|
profiles:
|
||||||
active: 272重构
|
active: local
|
Loading…
Reference in New Issue