优化分屏监控
This commit is contained in:
@@ -84,4 +84,10 @@ public interface StreamProxyMapper {
|
||||
|
||||
@SelectProvider(type = StreamProxyProvider.class, method = "select")
|
||||
StreamProxy select(@Param("id") int id);
|
||||
|
||||
@Update("UPDATE wvp_stream_proxy " +
|
||||
"SET pulling=false, " +
|
||||
"stream_key = null " +
|
||||
"WHERE id=#{id}")
|
||||
void removeStream(@Param("id")int id);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService {
|
||||
streamProxy.setMediaServerId(mediaServer.getId());
|
||||
streamProxy.setStreamKey(null);
|
||||
streamProxy.setPulling(false);
|
||||
streamProxyMapper.update(streamProxy);
|
||||
streamProxyMapper.removeStream(streamProxy.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -209,7 +209,8 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||
if (streamProxyInDb == null) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "代理不存在");
|
||||
}
|
||||
if (streamProxyMapper.update(streamProxy) > 0 && !ObjectUtils.isEmpty(streamProxy.getGbDeviceId())) {
|
||||
int updateResult = streamProxyMapper.update(streamProxy);
|
||||
if (updateResult > 0 && !ObjectUtils.isEmpty(streamProxy.getGbDeviceId())) {
|
||||
if (streamProxy.getGbId() > 0) {
|
||||
gbChannelService.update(streamProxy.buildCommonGBChannel());
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user