修复国标级联点播通道编号重复异常

pull/1642/head
648540858 2024-08-29 18:04:16 +08:00
parent 45f5f4e02d
commit de0ad2b32e
2 changed files with 9 additions and 3 deletions

View File

@ -199,10 +199,10 @@ public interface PlatformChannelMapper {
" coalesce(wpgc.custom_svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" +
" from wvp_device_channel wdc" +
" left join wvp_platform_channel wpgc on wdc.id = wpgc.device_channel_id" +
" where wdc.channel_type = 0 and wpgc.platform_id = #{platformId} and coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) = #{channelDeviceId}"
" where wdc.channel_type = 0 and wpgc.platform_id = #{platformId} and coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) = #{channelDeviceId} order by wdc.id "
)
CommonGBChannel queryOneWithPlatform(@Param("platformId") Integer platformId, @Param("channelDeviceId") String channelDeviceId);
List<CommonGBChannel> queryOneWithPlatform(@Param("platformId") Integer platformId, @Param("channelDeviceId") String channelDeviceId);
@Select("<script>" +
@ -306,6 +306,7 @@ public interface PlatformChannelMapper {
" #{item} " +
" </foreach> " +
"</if>" +
" order by wdc.id" +
"</script>")
List<CommonGBChannel> queryShare(@Param("platformId") Integer platformId, List<Integer> channelIds);

View File

@ -627,7 +627,12 @@ public class GbChannelServiceImpl implements IGbChannelService {
@Override
public CommonGBChannel queryOneWithPlatform(Integer platformId, String channelDeviceId) {
return platformChannelMapper.queryOneWithPlatform(platformId, channelDeviceId);
List<CommonGBChannel> channelList = platformChannelMapper.queryOneWithPlatform(platformId, channelDeviceId);
if (!channelList.isEmpty()) {
return channelList.get(channelList.size() - 1);
}else {
return null;
}
}
@Override