| | |
| | | log.debug("定时同步Vtdu任务"); |
| | | List<ArdChannel> channels = this.selectArdChannelList(new ArdChannel()); |
| | | if (channels == null || channels.isEmpty()) { |
| | | log.warn("没有获取到通道数据,退出同步"); |
| | | // log.warn("没有获取到通道数据,退出同步"); |
| | | return; |
| | | } |
| | | List<ArdVtdu> ardVtduList = ardVtduService.selectArdVtduList(new ArdVtdu()); |
| | |
| | | // 只有在线的无人机才存 Redis |
| | | String redisKey = CacheConstants.UAV_ONLINE_KEY + boxSn; |
| | | if (remote.getOnLine() == 1) { |
| | | redisCache.setCacheObject(redisKey, remote, 10, TimeUnit.SECONDS); |
| | | redisCache.setCacheObject(redisKey, remote, 30, TimeUnit.SECONDS); |
| | | } else { |
| | | redisCache.deleteObject(CacheConstants.UAV_ONLINE_KEY + boxSn); |
| | | } |