old mode 100644
new mode 100755
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.TransactionDefinition; |
| | | import org.springframework.transaction.TransactionStatus; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | deviceChannel.setRegisterWay(1); |
| | | |
| | | PlatformCatalog catalog = catalogMapper.select(catalogId); |
| | | PlatformCatalog catalog = catalogMapper.selectByPlatFormAndCatalogId(platform.getServerGBId(), catalogId); |
| | | if (catalog != null) { |
| | | deviceChannel.setCivilCode(catalog.getCivilCode()); |
| | | deviceChannel.setParentId(catalog.getParentId()); |
| | |
| | | deviceChannel.setStatus(status != null && status); |
| | | |
| | | deviceChannel.setRegisterWay(1); |
| | | PlatformCatalog catalog = catalogMapper.select(catalogId); |
| | | PlatformCatalog catalog = catalogMapper.selectByPlatFormAndCatalogId(platform.getServerGBId(), catalogId); |
| | | if (catalog != null) { |
| | | deviceChannel.setCivilCode(catalog.getCivilCode()); |
| | | deviceChannel.setParentId(catalog.getParentId()); |
| | |
| | | if (platform == null) { |
| | | return ; |
| | | } |
| | | if (ObjectUtils.isEmpty(catalogId)) { |
| | | catalogId = platform.getDeviceGBId(); |
| | | } |
| | | if (platformGbStreamMapper.delByPlatformAndCatalogId(platformId, catalogId) > 0) { |
| | | List<GbStream> gbStreams = platformGbStreamMapper.queryChannelInParentPlatformAndCatalog(platformId, catalogId); |
| | | List<DeviceChannel> deviceChannelList = new ArrayList<>(); |
| | |
| | | eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.DEL); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<GbStream> getGbChannelWithGbid(String gbId) { |
| | | return gbStreamMapper.selectByGBId(gbId); |
| | | } |
| | | } |