修复WVP作为下级平台接受devicecontrol命令处理-调试修改逻辑
This commit is contained in:
@@ -114,4 +114,7 @@ public interface PlatformChannelMapper {
|
||||
" left join device d on dc.deviceId = d.deviceId\n" +
|
||||
"where dc.channelId = #{channelId} and pgc.platformId=#{platformId}")
|
||||
List<Device> queryDeviceInfoByPlatformIdAndChannelId(String platformId, String channelId);
|
||||
|
||||
@Select("SELECT pgc.platformId FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE dc.channelId='${channelId}'")
|
||||
List<String> queryParentPlatformByChannelId(String channelId);
|
||||
}
|
||||
|
||||
@@ -133,6 +133,15 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
|
||||
if (allChannelMap.containsKey(deviceChannel.getChannelId())) {
|
||||
deviceChannel.setStreamId(allChannelMap.get(deviceChannel.getChannelId()).getStreamId());
|
||||
deviceChannel.setHasAudio(allChannelMap.get(deviceChannel.getChannelId()).isHasAudio());
|
||||
if (allChannelMap.get(deviceChannel.getChannelId()).getStatus() !=deviceChannel.getStatus()){
|
||||
List<String> strings = platformChannelMapper.queryParentPlatformByChannelId(deviceChannel.getChannelId());
|
||||
if (!CollectionUtils.isEmpty(strings)){
|
||||
strings.forEach(platformId->{
|
||||
eventPublisher.catalogEventPublish(platformId, deviceChannel, deviceChannel.getStatus()==1?CatalogEvent.ON:CatalogEvent.OFF);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
channels.add(deviceChannel);
|
||||
if (!ObjectUtils.isEmpty(deviceChannel.getParentId())) {
|
||||
|
||||
Reference in New Issue
Block a user