From ac1210d76e2fac974a5f728724437a72019e1c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Tue, 10 Mar 2026 13:19:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=8C=E6=AD=A5=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/device/service/impl/SynService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/ruoyi/device/service/impl/SynService.java b/src/main/java/com/ruoyi/device/service/impl/SynService.java index 045c276..a0050b5 100644 --- a/src/main/java/com/ruoyi/device/service/impl/SynService.java +++ b/src/main/java/com/ruoyi/device/service/impl/SynService.java @@ -209,14 +209,14 @@ public class SynService { // continue; // } - // 同步网关设备本身 -// log.info("开始同步网关: {}", gatewayInfo.getName()); + + log.info("开始同步网关: {}", gatewayInfo.getName()); syncDevice(gatewayInfo, DeviceType.GATEWAY, null); totalCount++; // 获取该网关的所有子设备ID List childDeviceIds = iThingsBoardDomain.getGatewayChildDevices(gatewayInfo.getId()); -// log.info("网关 {} 有 {} 个子设备", gatewayInfo.getName(), childDeviceIds.size()); + log.info("网关 {} 有 {} 个子设备", gatewayInfo.getName(), childDeviceIds.size()); // 遍历该网关的子设备 for (String childDeviceId : childDeviceIds) { @@ -270,7 +270,7 @@ public class SynService { } } -// log.info("========== 数据同步任务完成,共同步 {} 个设备,跳过 {} 个设备 ==========", totalCount, skippedCount); + log.info("========== 数据同步任务完成,共同步 {} 个设备,跳过 {} 个设备 ==========", totalCount, skippedCount); // 处理没有分组的机场,将其添加到默认分组 assignDocksToDefaultGroup(); @@ -458,8 +458,8 @@ public class SynService { String deviceName = deviceInfo.getName(); String deviceSn = deviceName; // 使用设备名称作为SN号,网关其实是没有SN号的 // -// log.info("开始同步设备: iotDeviceId={}, deviceName={}, deviceType={}, gatewayId={}", -// iotDeviceId, deviceName, deviceType, gatewayId); + log.info("开始同步设备: iotDeviceId={}, deviceName={}, deviceType={}, gatewayId={}", + iotDeviceId, deviceName, deviceType, gatewayId); // 查询设备是否已存在(通过 iotDeviceId) Device existingDevice = deviceDomain.selectDeviceByIotDeviceId(iotDeviceId);