Xiajijian
2025-12-05 50d9e71d9ef65da6bdf3c84bdaa4c97a2755599b
ard-work/src/main/java/com/ard/work/service/impl/ArdDroneInfoServiceImpl.java
@@ -84,8 +84,6 @@
                BoxStreamUrlReceiver boxLiveUrl = tyService.getBoxLiveUrl(uav.getBoxSn());
                if (boxLiveUrl != null) {
                    uav.setWebrtcUrl(boxLiveUrl.getRtc());
                } else {
                    log.warn("设备 {} 的直播地址为空", uav.getBoxSn());
                }
            } catch (Exception e) {
                log.error("获取设备 {} 的直播地址失败", uav.getBoxSn(), e);
@@ -238,7 +236,6 @@
        drone.setId(IdUtils.simpleUUID());
        drone.setBoxSn(box.getBoxSn());
        drone.setBoxName(box.getBoxName());
        drone.setBoxAliasName(box.getBoxName());
        drone.setStartTime(new Date());
        drone.setOnLine(box.getOnLine());
        drone.setVideoServer(box.getVideoServer());
@@ -289,7 +286,7 @@
            // 只有在线的无人机才存 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);
            }