Commit 73f2c89d13ea7b332b3129e528ea3e14ccd05d78

Authored by Lawrence
1 parent f00d6863

修改查询录像回放接口,兼容部分设备发出MediaStatus信息时将ChannelId当作DeviceId的问题

src/main/java/com/genersoft/iot/vmp/storager/redis/VideoManagerRedisStoragerImpl.java
@@ -554,6 +554,10 @@ public class VideoManagerRedisStoragerImpl implements IVideoManagerStorager { @@ -554,6 +554,10 @@ public class VideoManagerRedisStoragerImpl implements IVideoManagerStorager {
554 List<Object> playLeys = redis.scan(String.format("%S_*_%s_%s", VideoManagerConstants.PLAY_BLACK_PREFIX, 554 List<Object> playLeys = redis.scan(String.format("%S_*_%s_%s", VideoManagerConstants.PLAY_BLACK_PREFIX,
555 deviceId, 555 deviceId,
556 code)); 556 code));
  557 + if (playLeys == null || playLeys.size() == 0) {
  558 + playLeys = redis.scan(String.format("%S_*_*_%s", VideoManagerConstants.PLAY_BLACK_PREFIX,
  559 + deviceId));
  560 + }
557 if (playLeys == null || playLeys.size() == 0) return null; 561 if (playLeys == null || playLeys.size() == 0) return null;
558 return (StreamInfo)redis.get(playLeys.get(0).toString()); 562 return (StreamInfo)redis.get(playLeys.get(0).toString());
559 } 563 }