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