diff --git a/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java b/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java index 0380c050..2a1cbfdf 100644 --- a/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java +++ b/src/main/java/com/dispose/manager/impl/DisposeDeviceManagerImpl.java @@ -32,7 +32,7 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager { * The Dispose capacity mapper. */ @Resource - DisposeCapacityMapper disposeCapacityMapper; + private DisposeCapacityMapper disposeCapacityMapper; /** * The Dispose device mapper. */ @@ -59,7 +59,7 @@ public class DisposeDeviceManagerImpl implements DisposeDeviceManager { return new MulReturnType<>(ErrorCode.ERR_DATABASE, -1L); } else { // 添加设备到缓存中,方便调用时查找 - String devKey = dev.getDeviceName() + ":" + dev.getIpPort(); + String devKey = dev.getIpAddr() + ":" + dev.getIpPort(); disposeDevice.put(devKey, dev); // 添加设备能力信息 disposeCapacityMapper.addNewDisposeCapacity(dev.getDevCapacity());