调整参数名称

pull/1524/head
648540858 2024-06-17 10:08:09 +08:00
parent b1d9ea8082
commit 1909c7f71f
3 changed files with 12 additions and 12 deletions

View File

@ -43,9 +43,9 @@ public interface IStreamPushService {
/** /**
* *
* @param app * @param app
* @param streamId ID * @param stream ID
*/ */
boolean stop(String app, String streamId); boolean stop(String app, String stream);
/** /**
* *

View File

@ -274,19 +274,19 @@ public class StreamPushServiceImpl implements IStreamPushService {
} }
@Override @Override
public boolean stop(String app, String streamId) { public boolean stop(String app, String stream) {
logger.info("[推流 ] 停止流: {}/{}", app, streamId); logger.info("[推流 ] 停止流: {}/{}", app, stream);
StreamPushItem streamPushItem = streamPushMapper.selectOne(app, streamId); StreamPushItem streamPushItem = streamPushMapper.selectOne(app, stream);
if (streamPushItem != null) { if (streamPushItem != null) {
gbStreamService.sendCatalogMsg(streamPushItem, CatalogEvent.DEL); gbStreamService.sendCatalogMsg(streamPushItem, CatalogEvent.DEL);
} }
platformGbStreamMapper.delByAppAndStream(app, streamId); platformGbStreamMapper.delByAppAndStream(app, stream);
gbStreamMapper.del(app, streamId); gbStreamMapper.del(app, stream);
int delStream = streamPushMapper.del(app, streamId); int delStream = streamPushMapper.del(app, stream);
if (delStream > 0) { if (delStream > 0) {
MediaServer mediaServerItem = mediaServerService.getOne(streamPushItem.getMediaServerId()); MediaServer mediaServerItem = mediaServerService.getOne(streamPushItem.getMediaServerId());
mediaServerService.closeStreams(mediaServerItem,app, streamId); mediaServerService.closeStreams(mediaServerItem,app, stream);
} }
return true; return true;
} }

View File

@ -112,9 +112,9 @@ public class StreamPushController {
@ResponseBody @ResponseBody
@Operation(summary = "中止一个推流", security = @SecurityRequirement(name = JwtUtils.HEADER)) @Operation(summary = "中止一个推流", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "app", description = "应用名", required = true) @Parameter(name = "app", description = "应用名", required = true)
@Parameter(name = "streamId", description = "流id", required = true) @Parameter(name = "stream", description = "流id", required = true)
public void stop(String app, String streamId){ public void stop(String app, String stream){
if (!streamPushService.stop(app, streamId)){ if (!streamPushService.stop(app, stream)){
throw new ControllerException(ErrorCode.ERROR100); throw new ControllerException(ErrorCode.ERROR100);
} }
} }