From 34b44d037f6e4ae9ced9f78c6fdc8927a721e942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=B7=E6=88=90=E4=BC=9F?= Date: Mon, 4 Nov 2024 10:19:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=BC=93=E5=AD=98=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=89=A9=E6=A8=A1=E5=9E=8BID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/cache/domain/DeviceInfoCache.java | 20 +++++++++++++++++++ .../service/impl/EquipmentCacheImpl.java | 1 + 2 files changed, 21 insertions(+) diff --git a/das/src/main/java/com/das/modules/cache/domain/DeviceInfoCache.java b/das/src/main/java/com/das/modules/cache/domain/DeviceInfoCache.java index 172a819c..b7ed5c58 100644 --- a/das/src/main/java/com/das/modules/cache/domain/DeviceInfoCache.java +++ b/das/src/main/java/com/das/modules/cache/domain/DeviceInfoCache.java @@ -7,9 +7,29 @@ import lombok.Data; */ @Data public class DeviceInfoCache { + /** + * 设备ID + */ private Long deviceId; + /** + * 设备Code + */ private String deviceCode; + /** + * 设备名称 + */ private String deviceName; + /** + * 设备类型 + */ private Integer objectType; + /** + * 父设备 + */ private Long parentDeviceId; + + /** + * 物模型ID + */ + private Long iotModelId; } diff --git a/das/src/main/java/com/das/modules/cache/service/impl/EquipmentCacheImpl.java b/das/src/main/java/com/das/modules/cache/service/impl/EquipmentCacheImpl.java index 63947325..6f9015b8 100644 --- a/das/src/main/java/com/das/modules/cache/service/impl/EquipmentCacheImpl.java +++ b/das/src/main/java/com/das/modules/cache/service/impl/EquipmentCacheImpl.java @@ -73,6 +73,7 @@ public class EquipmentCacheImpl implements EquipmentCache { deviceInfoCache.setDeviceName(equipment.getName()); deviceInfoCache.setObjectType(equipment.getObjectType()); deviceInfoCache.setParentDeviceId(equipment.getParentEquipmentId()); + deviceInfoCache.setIotModelId(equipment.getIotModelId()); //如果是已经缓存过的设备直接缓存 Integer index = deviceIdIndex.get(deviceId); if (index != null) {