소스 검색

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