| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.TransactionDefinition; |
| | | import org.springframework.transaction.TransactionStatus; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.*; |
| | |
| | | Map<String, MediaItem> streamInfoPushItemMap = new HashMap<>(); |
| | | if (pushList.size() > 0) { |
| | | for (StreamPushItem streamPushItem : pushList) { |
| | | if (StringUtils.isEmpty(streamPushItem.getGbId())) { |
| | | if (ObjectUtils.isEmpty(streamPushItem.getGbId())) { |
| | | pushItemMap.put(streamPushItem.getApp() + streamPushItem.getStream(), streamPushItem); |
| | | } |
| | | } |
| | |
| | | platformId, platformForEvent.get(platformId), CatalogEvent.ADD); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); |
| | | try { |
| | | int addStreamResult = streamPushMapper.add(stream); |
| | | if (!StringUtils.isEmpty(stream.getGbId())) { |
| | | if (!ObjectUtils.isEmpty(stream.getGbId())) { |
| | | stream.setStreamType("push"); |
| | | gbStreamMapper.add(stream); |
| | | } |