添加字段控制是否自动同步国标通道

结构优化
648540858 2023-09-26 15:39:52 +08:00
parent 527dd66c0d
commit e2f0533510
2 changed files with 18 additions and 6 deletions

View File

@ -292,17 +292,17 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
}
@Override
public void deleteGbChannelsFromList(List<DeviceChannel> deleteChannelList) {
commonGbChannelMapper.deleteByDeviceIDs(deleteChannelList);
public void deleteGbChannelsFromList(List<DeviceChannel> channelList) {
commonGbChannelMapper.deleteByDeviceIDs(channelList);
}
@Override
public void channelsOnlineFromList(List<DeviceChannel> deleteChannelList) {
public void channelsOnlineFromList(List<DeviceChannel> channelList) {
commonGbChannelMapper.channelsOnlineFromList(channelList);
}
@Override
public void channelsOfflineFromList(List<DeviceChannel> deleteChannelList) {
public void channelsOfflineFromList(List<DeviceChannel> channelList) {
commonGbChannelMapper.channelsOfflineFromList(channelList);
}
}

View File

@ -289,4 +289,16 @@ public interface CommonGbChannelMapper {
"</script>")
int deleteByDeviceIDs(List<DeviceChannel> clearChannels);
@Update("<script> "+
"UPDATE wvp_common_gb_channel SET commonGbStatus = true WHERE common_gb_id in" +
"<foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.commonGbChannelId}</foreach>" +
"</script>")
void channelsOnlineFromList(List<DeviceChannel> channelList);
@Update("<script> "+
"UPDATE wvp_common_gb_channel SET commonGbStatus = false WHERE common_gb_id in" +
"<foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.commonGbChannelId}</foreach>" +
"</script>")
void channelsOfflineFromList(List<DeviceChannel> channelList);
}