Преглед на файлове

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

jay преди 1 година
родител
ревизия
97f61d05d0
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      iot-module/iot-plugin/iot-plugin-main/src/main/java/cc/iotkit/plugin/main/ThingServiceImpl.java

+ 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) {