|
@ -118,14 +118,14 @@ public class GbStreamServiceImpl implements IGbStreamService { |
|
|
TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); |
|
|
TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); |
|
|
try { |
|
|
try { |
|
|
List<DeviceChannel> deviceChannelList = new ArrayList<>(); |
|
|
List<DeviceChannel> deviceChannelList = new ArrayList<>(); |
|
|
|
|
|
platformGbStreamMapper.delByAppAndStreamsByPlatformId(gbStreams, platformId); |
|
|
for (GbStream gbStream : gbStreams) { |
|
|
for (GbStream gbStream : gbStreams) { |
|
|
platformGbStreamMapper.delByAppAndStreamAndPlatform(gbStream.getApp(), gbStream.getStream(), platformId); |
|
|
|
|
|
DeviceChannel deviceChannel = new DeviceChannel(); |
|
|
DeviceChannel deviceChannel = new DeviceChannel(); |
|
|
deviceChannel.setChannelId(gbStream.getGbId()); |
|
|
deviceChannel.setChannelId(gbStream.getGbId()); |
|
|
deviceChannelList.add(deviceChannel); |
|
|
deviceChannelList.add(deviceChannel); |
|
|
eventPublisher.catalogEventPublish(platformId, deviceChannel, CatalogEvent.DEL); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.DEL); |
|
|
dataSourceTransactionManager.commit(transactionStatus); //手动提交
|
|
|
dataSourceTransactionManager.commit(transactionStatus); //手动提交
|
|
|
result = true; |
|
|
result = true; |
|
|
}catch (Exception e) { |
|
|
}catch (Exception e) { |
|
|