临时提交
parent
241fa9030a
commit
0f23c3bb46
|
@ -101,4 +101,5 @@ public interface IStreamProxyService {
|
||||||
* 根据通用通道查询拉流代理
|
* 根据通用通道查询拉流代理
|
||||||
*/
|
*/
|
||||||
StreamProxy getStreamProxyByCommonGbChannelId(int commonGbId);
|
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>")
|
"</script>")
|
||||||
List<CommonGbChannel> getAll();
|
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);
|
CommonGbChannel getOne(@Param("commonGbChannelId") int commonGbChannelId);
|
||||||
|
|
||||||
@Select("<script> "+
|
@Select("<script> "+
|
||||||
|
|
|
@ -202,4 +202,7 @@ public interface StreamPushMapper {
|
||||||
"</foreach>" +
|
"</foreach>" +
|
||||||
"</script>")
|
"</script>")
|
||||||
int delAllByIds(List<Integer> streamPushIdList);
|
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) {
|
if (commonGbChannel == null) {
|
||||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), "通道不存在");
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), "通道不存在");
|
||||||
}
|
}
|
||||||
if (commonGbChannel.getType().equals(CommonGbChannelType.GB28181)) {
|
switch (commonGbChannel.getType()) {
|
||||||
|
case CommonGbChannelType.GB28181:
|
||||||
DeviceChannel deviceChannel = deviceChannelService.getChannelByCommonChannelId(commonGbChannel.getCommonGbId());
|
DeviceChannel deviceChannel = deviceChannelService.getChannelByCommonChannelId(commonGbChannel.getCommonGbId());
|
||||||
resultMap.put(CommonGbChannelType.GB28181, deviceChannel);
|
resultMap.put(CommonGbChannelType.GB28181, deviceChannel);
|
||||||
}else if (commonGbChannel.getType().equals(CommonGbChannelType.PUSH)) {
|
break;
|
||||||
|
case CommonGbChannelType.PUSH:
|
||||||
StreamPush streamPush = streamPushService.getPushByCommonChannelId(commonGbChannel.getCommonGbId());
|
StreamPush streamPush = streamPushService.getPushByCommonChannelId(commonGbChannel.getCommonGbId());
|
||||||
resultMap.put(CommonGbChannelType.PUSH, streamPush);
|
resultMap.put(CommonGbChannelType.PUSH, streamPush);
|
||||||
}else if (commonGbChannel.getType().equals(CommonGbChannelType.PROXY)) {
|
break;
|
||||||
StreamProxy streamProxy = streamProxyService.getProxyByCommonChnanelId(commonGbChannel.getCommonGbId());
|
case CommonGbChannelType.PROXY:
|
||||||
|
StreamProxy streamProxy = streamProxyService.getStreamProxyByCommonGbChannelId(commonGbChannel.getCommonGbId());
|
||||||
resultMap.put(CommonGbChannelType.PROXY, streamProxy);
|
resultMap.put(CommonGbChannelType.PROXY, streamProxy);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue