添加同步日志

This commit is contained in:
孙小云 2026-03-10 13:19:37 +08:00
parent dfbfee9e49
commit ac1210d76e
1 changed files with 6 additions and 6 deletions

View File

@ -209,14 +209,14 @@ public class SynService {
// continue; // continue;
// } // }
// 同步网关设备本身
// log.info("开始同步网关: {}", gatewayInfo.getName()); log.info("开始同步网关: {}", gatewayInfo.getName());
syncDevice(gatewayInfo, DeviceType.GATEWAY, null); syncDevice(gatewayInfo, DeviceType.GATEWAY, null);
totalCount++; totalCount++;
// 获取该网关的所有子设备ID // 获取该网关的所有子设备ID
List<String> childDeviceIds = iThingsBoardDomain.getGatewayChildDevices(gatewayInfo.getId()); List<String> childDeviceIds = iThingsBoardDomain.getGatewayChildDevices(gatewayInfo.getId());
// log.info("网关 {} 有 {} 个子设备", gatewayInfo.getName(), childDeviceIds.size()); log.info("网关 {} 有 {} 个子设备", gatewayInfo.getName(), childDeviceIds.size());
// 遍历该网关的子设备 // 遍历该网关的子设备
for (String childDeviceId : childDeviceIds) { for (String childDeviceId : childDeviceIds) {
@ -270,7 +270,7 @@ public class SynService {
} }
} }
// log.info("========== 数据同步任务完成,共同步 {} 个设备,跳过 {} 个设备 ==========", totalCount, skippedCount); log.info("========== 数据同步任务完成,共同步 {} 个设备,跳过 {} 个设备 ==========", totalCount, skippedCount);
// 处理没有分组的机场将其添加到默认分组 // 处理没有分组的机场将其添加到默认分组
assignDocksToDefaultGroup(); assignDocksToDefaultGroup();
@ -458,8 +458,8 @@ public class SynService {
String deviceName = deviceInfo.getName(); String deviceName = deviceInfo.getName();
String deviceSn = deviceName; // 使用设备名称作为SN号,网关其实是没有SN号的 String deviceSn = deviceName; // 使用设备名称作为SN号,网关其实是没有SN号的
// //
// log.info("开始同步设备: iotDeviceId={}, deviceName={}, deviceType={}, gatewayId={}", log.info("开始同步设备: iotDeviceId={}, deviceName={}, deviceType={}, gatewayId={}",
// iotDeviceId, deviceName, deviceType, gatewayId); iotDeviceId, deviceName, deviceType, gatewayId);
// 查询设备是否已存在通过 iotDeviceId // 查询设备是否已存在通过 iotDeviceId
Device existingDevice = deviceDomain.selectDeviceByIotDeviceId(iotDeviceId); Device existingDevice = deviceDomain.selectDeviceByIotDeviceId(iotDeviceId);