Pārlūkot izejas kodu

fix 未注册设备更新最新通讯时间导致注册失败

jay 1 gadu atpakaļ
vecāks
revīzija
97f61d05d0

+ 4 - 2
iot-module/iot-plugin/iot-plugin-main/src/main/java/cc/iotkit/plugin/main/ThingServiceImpl.java

@@ -84,9 +84,11 @@ public class ThingServiceImpl implements IThingService {
             DeviceInfo device = getDeviceInfo(deviceName);
             if (device == null) {
                 log.warn("device:{} is not found.", deviceName);
+            }else {
+                long lastTime = System.currentTimeMillis();
+                deviceUpdateLastTime(device, lastTime);
             }
-            long lastTime = System.currentTimeMillis();
-            deviceUpdateLastTime(device, lastTime);
+
 
             ActionType type = action.getType();
             switch (type) {