Commit 3cd1378d39ed026ed05a1008c3bc92d39162d60b

Authored by 648540858
1 parent 715ecb1d

修复新设备注册

src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
@@ -75,9 +75,6 @@ public class DeviceServiceImpl implements IDeviceService { @@ -75,9 +75,6 @@ public class DeviceServiceImpl implements IDeviceService {
75 redisCatchStorage.clearCatchByDeviceId(device.getDeviceId()); 75 redisCatchStorage.clearCatchByDeviceId(device.getDeviceId());
76 76
77 } 77 }
78 - if (device.getCreateTime() == null) {  
79 - device.setCreateTime(now);  
80 - }  
81 if (device.getRegisterTime() == null) { 78 if (device.getRegisterTime() == null) {
82 device.setRegisterTime(now); 79 device.setRegisterTime(now);
83 } 80 }
@@ -88,6 +85,7 @@ public class DeviceServiceImpl implements IDeviceService { @@ -88,6 +85,7 @@ public class DeviceServiceImpl implements IDeviceService {
88 85
89 // 第一次上线 86 // 第一次上线
90 if (device.getCreateTime() == null) { 87 if (device.getCreateTime() == null) {
  88 + device.setCreateTime(now);
91 logger.info("[设备上线,首次注册]: {},查询设备信息以及通道信息", device.getDeviceId()); 89 logger.info("[设备上线,首次注册]: {},查询设备信息以及通道信息", device.getDeviceId());
92 commander.deviceInfoQuery(device); 90 commander.deviceInfoQuery(device);
93 sync(device); 91 sync(device);