推流导入支持添加平台信息与目录信息
This commit is contained in:
@@ -131,7 +131,7 @@ public class EventPublisher {
|
||||
}
|
||||
|
||||
@Async
|
||||
public void catalogEventPublishForStream(String platformId, List<GbStream> gbStreams, String type) {
|
||||
public void catalogEventPublishForStream(String platformId, GbStream[] gbStreams, String type) {
|
||||
CatalogEvent outEvent = new CatalogEvent(this);
|
||||
outEvent.setGbStreams(gbStreams);
|
||||
outEvent.setType(type);
|
||||
@@ -141,8 +141,7 @@ public class EventPublisher {
|
||||
|
||||
@Async
|
||||
public void catalogEventPublishForStream(String platformId, GbStream gbStream, String type) {
|
||||
List<GbStream> gbStreamList = new ArrayList<>();
|
||||
gbStreamList.add(gbStream);
|
||||
catalogEventPublishForStream(platformId, gbStreamList, type);
|
||||
GbStream[] gbStreams = {gbStream};
|
||||
catalogEventPublishForStream(platformId, gbStreams, type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class CatalogEvent extends ApplicationEvent {
|
||||
public static final String UPDATE = "UPDATE"; // 更新
|
||||
|
||||
private List<DeviceChannel> deviceChannels;
|
||||
private List<GbStream> gbStreams;
|
||||
private GbStream[] gbStreams;
|
||||
private String type;
|
||||
private String platformId;
|
||||
|
||||
@@ -48,11 +48,11 @@ public class CatalogEvent extends ApplicationEvent {
|
||||
this.platformId = platformId;
|
||||
}
|
||||
|
||||
public List<GbStream> getGbStreams() {
|
||||
public GbStream[] getGbStreams() {
|
||||
return gbStreams;
|
||||
}
|
||||
|
||||
public void setGbStreams(List<GbStream> gbStreams) {
|
||||
public void setGbStreams(GbStream[] gbStreams) {
|
||||
this.gbStreams = gbStreams;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
|
||||
if (event.getDeviceChannels() != null) {
|
||||
deviceChannelList.addAll(event.getDeviceChannels());
|
||||
}
|
||||
if (event.getGbStreams() != null && event.getGbStreams().size() > 0){
|
||||
if (event.getGbStreams() != null && event.getGbStreams().length > 0){
|
||||
for (GbStream gbStream : event.getGbStreams()) {
|
||||
DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), parentPlatform.getDeviceGBId());
|
||||
deviceChannelList.add(deviceChannelByStream);
|
||||
@@ -134,7 +134,7 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
|
||||
if (event.getDeviceChannels() != null) {
|
||||
deviceChannelList.addAll(event.getDeviceChannels());
|
||||
}
|
||||
if (event.getGbStreams() != null && event.getGbStreams().size() > 0){
|
||||
if (event.getGbStreams() != null && event.getGbStreams().length > 0){
|
||||
for (GbStream gbStream : event.getGbStreams()) {
|
||||
DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), parentPlatform.getDeviceGBId());
|
||||
deviceChannelList.add(deviceChannelByStream);
|
||||
|
||||
Reference in New Issue
Block a user