old mode 100644
new mode 100755
 |  |  | 
 |  |  | import com.genersoft.iot.vmp.service.bean.MessageForPushChannel; | 
 |  |  | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; | 
 |  |  | import com.genersoft.iot.vmp.storager.dao.DeviceChannelMapper; | 
 |  |  | import com.genersoft.iot.vmp.storager.dao.DeviceMapper; | 
 |  |  | import com.genersoft.iot.vmp.storager.dao.dto.PlatformRegisterInfo; | 
 |  |  | import com.genersoft.iot.vmp.utils.DateUtil; | 
 |  |  | import com.genersoft.iot.vmp.utils.JsonUtil; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private DeviceChannelMapper deviceChannelMapper; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private DeviceMapper deviceMapper; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private UserSetting userSetting; | 
 |  |  | 
 |  |  |         for (Object o : keys) { | 
 |  |  |             String key = (String) o; | 
 |  |  |             Device device = JsonUtil.redisJsonToObject(redisTemplate, key, Device.class); | 
 |  |  |             if (Objects.nonNull(device)) { // 只取没有存过得 | 
 |  |  |             if (Objects.nonNull(device)) { | 
 |  |  |                 // 只取没有存过得 | 
 |  |  |                 result.add(JsonUtil.redisJsonToObject(redisTemplate, key, Device.class)); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  | 
 |  |  |     @Override | 
 |  |  |     public Device getDevice(String deviceId) { | 
 |  |  |         String key = VideoManagerConstants.DEVICE_PREFIX + userSetting.getServerId() + "_" + deviceId; | 
 |  |  |         return JsonUtil.redisJsonToObject(redisTemplate, key, Device.class); | 
 |  |  |         Device device = JsonUtil.redisJsonToObject(redisTemplate, key, Device.class); | 
 |  |  |         if (device == null){ | 
 |  |  |             device = deviceMapper.getDeviceByDeviceId(deviceId); | 
 |  |  |             if (device != null) { | 
 |  |  |                 updateDevice(device); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return device; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public void updateGpsMsgInfo(GPSMsgInfo gpsMsgInfo) { | 
 |  |  |         String key = VideoManagerConstants.WVP_STREAM_GPS_MSG_PREFIX + userSetting.getServerId() + "_" + gpsMsgInfo.getId(); | 
 |  |  |         Duration duration = Duration.ofSeconds(60L); | 
 |  |  |         redisTemplate.opsForValue().set(key, gpsMsgInfo, duration); // 默认GPS消息保存1分钟 | 
 |  |  |         redisTemplate.opsForValue().set(key, gpsMsgInfo, duration); | 
 |  |  |         // 默认GPS消息保存1分钟 | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override |