old mode 100644
new mode 100755
| | |
| | | int allCount = 0; |
| | | boolean result = false; |
| | | TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); |
| | | int limitCount = 300; |
| | | int limitCount = 50; |
| | | if (channelReducesToAdd.size() > 0) { |
| | | if (channelReducesToAdd.size() > limitCount) { |
| | | for (int i = 0; i < channelReducesToAdd.size(); i += limitCount) { |
| | |
| | | List<DeviceChannel> deviceChannelList = new ArrayList<>(); |
| | | if (channelReduces.size() > 0){ |
| | | PlatformCatalog catalog = catalogManager.selectByPlatFormAndCatalogId(platform.getServerGBId(),catalogId); |
| | | if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) { |
| | | if (catalog == null && catalogId.equals(platform.getDeviceGBId())) { |
| | | for (ChannelReduce channelReduce : channelReduces) { |
| | | DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId()); |
| | | deviceChannel.setParental(0); |
| | | deviceChannel.setCivilCode(platform.getServerGBDomain()); |
| | | deviceChannelList.add(deviceChannel); |
| | | } |
| | | return deviceChannelList; |
| | | } else if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) { |
| | | logger.warn("未查询到目录{}的信息", catalogId); |
| | | return null; |
| | | } |
| | |
| | | return 0; |
| | | } |
| | | if (ObjectUtils.isEmpty(catalogId)) { |
| | | catalogId = platform.getDeviceGBId(); |
| | | catalogId = null; |
| | | } |
| | | |
| | | if ((result = platformChannelMapper.delChannelForGBByCatalogId(platformId, catalogId)) > 0) { |