临时提交
parent
241fa9030a
commit
0f23c3bb46
|
@ -101,4 +101,5 @@ public interface IStreamProxyService {
|
|||
* 根据通用通道查询拉流代理
|
||||
*/
|
||||
StreamProxy getStreamProxyByCommonGbChannelId(int commonGbId);
|
||||
|
||||
}
|
||||
|
|
|
@ -552,4 +552,9 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StreamPush getPushByCommonChannelId(int commonGbId) {
|
||||
return streamPushMapper.getOneByCommonChannelId(commonGbId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -660,7 +660,7 @@ public interface CommonChannelMapper {
|
|||
"</script>")
|
||||
List<CommonGbChannel> getAll();
|
||||
|
||||
@Select("SELECT common_gb_id FROM wvp_common_channel WHERE common_gb_id = #{commonGbChannelId}")
|
||||
@Select("SELECT * FROM wvp_common_channel WHERE common_gb_id = #{commonGbChannelId}")
|
||||
CommonGbChannel getOne(@Param("commonGbChannelId") int commonGbChannelId);
|
||||
|
||||
@Select("<script> "+
|
||||
|
|
|
@ -202,4 +202,7 @@ public interface StreamPushMapper {
|
|||
"</foreach>" +
|
||||
"</script>")
|
||||
int delAllByIds(List<Integer> streamPushIdList);
|
||||
|
||||
@Select("select * from wvp_stream_push where common_gb_channel_id = #{commonGbId}")
|
||||
StreamPush getOneByCommonChannelId(@Param("commonGbId") int commonGbId);
|
||||
}
|
||||
|
|
|
@ -383,15 +383,19 @@ public class CommonChannelController {
|
|||
if (commonGbChannel == null) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "通道不存在");
|
||||
}
|
||||
if (commonGbChannel.getType().equals(CommonGbChannelType.GB28181)) {
|
||||
switch (commonGbChannel.getType()) {
|
||||
case CommonGbChannelType.GB28181:
|
||||
DeviceChannel deviceChannel = deviceChannelService.getChannelByCommonChannelId(commonGbChannel.getCommonGbId());
|
||||
resultMap.put(CommonGbChannelType.GB28181, deviceChannel);
|
||||
}else if (commonGbChannel.getType().equals(CommonGbChannelType.PUSH)) {
|
||||
break;
|
||||
case CommonGbChannelType.PUSH:
|
||||
StreamPush streamPush = streamPushService.getPushByCommonChannelId(commonGbChannel.getCommonGbId());
|
||||
resultMap.put(CommonGbChannelType.PUSH, streamPush);
|
||||
}else if (commonGbChannel.getType().equals(CommonGbChannelType.PROXY)) {
|
||||
StreamProxy streamProxy = streamProxyService.getProxyByCommonChnanelId(commonGbChannel.getCommonGbId());
|
||||
break;
|
||||
case CommonGbChannelType.PROXY:
|
||||
StreamProxy streamProxy = streamProxyService.getStreamProxyByCommonGbChannelId(commonGbChannel.getCommonGbId());
|
||||
resultMap.put(CommonGbChannelType.PROXY, streamProxy);
|
||||
break;
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue