修复批量设置子码流类型

dev/数据库统合
648540858 2024-12-11 11:43:41 +08:00
parent 425bf04591
commit 6258bf6969
2 changed files with 9 additions and 1 deletions

View File

@ -413,6 +413,10 @@ public interface DeviceChannelMapper {
"</script>")
void updateChannelStreamIdentification(DeviceChannel channel);
@Update("<script>" +
"UPDATE wvp_device_channel SET stream_identification=#{streamIdentification}" +
"</script>")
void updateAllChannelStreamIdentification(@Param("streamIdentification") String streamIdentification);
@Update({"<script>" +
"<foreach collection='channelList' item='item' separator=';'>" +

View File

@ -336,7 +336,11 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
log.info("[更新通道码流类型] 设备: {}, 通道:{} 码流: {}", channel.getDeviceId(), channel.getDeviceId(),
channel.getStreamIdentification());
}
channelMapper.updateChannelStreamIdentification(channel);
if (channel.getId() > 0) {
channelMapper.updateChannelStreamIdentification(channel);
}else {
channelMapper.updateAllChannelStreamIdentification(channel.getStreamIdentification());
}
}
@Override