Explorar el Código

修改bug 修改注册设备的状态设置

lishuangjiang@potevio.com hace 1 año
padre
commit
a135614d63

+ 2 - 5
iot-module/iot-openapi/src/main/java/cc/iotkit/openapi/service/impl/OpenDeviceServiceImpl.java

@@ -27,10 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
 
 
 @Service
@@ -102,7 +99,7 @@ public class OpenDeviceServiceImpl implements OpenDeviceService {
         device.setSecret(secret.toString());
         device.setTenantId(product.getTenantId());
         device.setCreateDept(deptId);
-        device.setState(new DeviceInfo.State(false, null, null));
+        device.setState(new DeviceInfo.State(true, new Date().getTime(), null));
 //        device.setLocate(new DeviceInfo.Locate(deviceInfo.getLongitude(),deviceInfo.getLatitude()));
         device.setCreateAt(System.currentTimeMillis());
         if (StringUtils.isNotBlank(parentId)) {