修复NOTIFY消息通道信息的更新

This commit is contained in:
648540858
2024-09-19 16:23:11 +08:00
parent 43a2344ad0
commit f38c86092d
4 changed files with 68 additions and 9 deletions

View File

@@ -45,7 +45,7 @@ public interface IDeviceChannelService {
* 批量删除通道
* @param deleteChannelList 待删除的通道列表
*/
int deleteChannels(List<DeviceChannel> deleteChannelList);
int deleteChannelsForNotify(List<DeviceChannel> deleteChannelList);
/**
* 批量上线
@@ -67,7 +67,7 @@ public interface IDeviceChannelService {
/**
* 直接批量更新通道
*/
void batchUpdateChannel(List<DeviceChannel> channels);
void batchUpdateChannelForNotify(List<DeviceChannel> channels);
/**
* 直接批量添加

View File

@@ -193,8 +193,8 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
}
@Override
public int deleteChannels(List<DeviceChannel> deleteChannelList) {
return channelMapper.batchDel(deleteChannelList);
public int deleteChannelsForNotify(List<DeviceChannel> deleteChannelList) {
return channelMapper.batchDelForNotify(deleteChannelList);
}
@Override
@@ -242,7 +242,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
}
@Override
public synchronized void batchUpdateChannel(List<DeviceChannel> channels) {
public synchronized void batchUpdateChannelForNotify(List<DeviceChannel> channels) {
String now = DateUtil.getNow();
for (DeviceChannel channel : channels) {
channel.setUpdateTime(now);
@@ -255,10 +255,10 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
if (i + limitCount > channels.size()) {
toIndex = channels.size();
}
channelMapper.batchUpdate(channels.subList(i, toIndex));
channelMapper.batchUpdateForNotify(channels.subList(i, toIndex));
}
}else {
channelMapper.batchUpdate(channels);
channelMapper.batchUpdateForNotify(channels);
}
}
}