优化文档, 优化notify-catalog大并发处理

This commit is contained in:
648540858
2024-10-11 15:24:46 +08:00
parent 028274a088
commit 3078162c58
45 changed files with 842 additions and 392 deletions

View File

@@ -111,4 +111,12 @@ public interface IDeviceChannelService {
DeviceChannel getBroadcastChannel(int deviceDbId);
void changeAudio(Integer channelId, Boolean audio);
void updateChannelStatus(DeviceChannel channel);
void addChannel(DeviceChannel channel);
void updateChannelForNotify(DeviceChannel channel);
DeviceChannel getOneForSource(int deviceDbId, String channelId);
}

View File

@@ -267,6 +267,11 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
return channelMapper.getOneByDeviceIdForSource(device.getId(), channelId);
}
@Override
public DeviceChannel getOneForSource(int deviceDbId, String channelId) {
return channelMapper.getOneByDeviceIdForSource(deviceDbId, channelId);
}
@Override
@Transactional
public synchronized void batchUpdateChannelForNotify(List<DeviceChannel> channels) {
@@ -654,4 +659,19 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
public void changeAudio(Integer channelId, Boolean audio) {
channelMapper.changeAudio(channelId, audio);
}
@Override
public void updateChannelStatus(DeviceChannel channel) {
channelMapper.updateStatus(channel);
}
@Override
public void addChannel(DeviceChannel channel) {
channelMapper.add(channel);
}
@Override
public void updateChannelForNotify(DeviceChannel channel) {
channelMapper.updateChannelForNotify(channel);
}
}