648540858
2020-10-16 a7f224b1af1e669eda38da867187a148dc993bbb
src/main/java/com/genersoft/iot/vmp/storager/redis/VideoManagerRedisStoragerImpl.java
@@ -93,7 +93,7 @@
                  ":" + channel.getName() +
                  "_" + (channel.getStatus() == 1 ? "on":"off") +
                  "_" + (channelMap.get(channelId).size() > 0)+
                  "_" + channel.getParentId(),
                  "_" + (StringUtils.isEmpty(channel.getParentId())?null:channel.getParentId()),
            channel);
      // 更新device中的通道数量
      Device device = (Device)redis.get(VideoManagerConstants.DEVICE_PREFIX+deviceId);
@@ -113,7 +113,14 @@
         DeviceChannel deviceChannel = queryChannel(deviceId, parentId);
         if (deviceChannel != null) {
            deviceChannel.setSubCount(channelMap.get(parentId).size());
            redis.set(VideoManagerConstants.CACHEKEY_PREFIX+deviceId + "_" + deviceChannel.getChannelId(),
//            redis.set(VideoManagerConstants.CACHEKEY_PREFIX+deviceId + "_" + deviceChannel.getChannelId(),
//                  deviceChannel);
            redis.set(VideoManagerConstants.CACHEKEY_PREFIX + deviceId +
                        "_" + deviceChannel.getChannelId() +
                        ":" + deviceChannel.getName() +
                        "_" + (deviceChannel.getStatus() == 1 ? "on":"off") +
                        "_" + (channelMap.get(deviceChannel.getChannelId()).size() > 0)+
                        "_" + (StringUtils.isEmpty(deviceChannel.getParentId())?null:deviceChannel.getParentId()),
                  deviceChannel);
         }
@@ -438,7 +445,8 @@
               if (subChannel == null) {
                  subChannel = new HashSet<>();
               }
               if (!"null".equals(s[6])) {
               System.out.println(key);
               if (s.length == 7 && !"null".equals(s[6])) {
                  subChannel.add(s[6]);
               }
               channelMap.put(channelId, subChannel);