Browse Source
Merge pull request #491 from mk1990/wvp-28181-2.0
解决设备第一次注册获取不到设备信息和通道信息的问题
pull/490/merge
648540858
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
|
|
@ -77,13 +77,15 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
if (device.getCreateTime() == null) { |
|
|
|
device.setCreateTime(now); |
|
|
|
logger.info("[设备上线,首次注册]: {},查询设备信息以及通道信息", device.getDeviceId()); |
|
|
|
deviceMapper.add(device); |
|
|
|
redisCatchStorage.updateDevice(device); |
|
|
|
commander.deviceInfoQuery(device); |
|
|
|
sync(device); |
|
|
|
deviceMapper.add(device); |
|
|
|
}else { |
|
|
|
deviceMapper.update(device); |
|
|
|
} |
|
|
|
redisCatchStorage.updateDevice(device); |
|
|
|
} |
|
|
|
|
|
|
|
// 上线添加订阅
|
|
|
|
if (device.getSubscribeCycleForCatalog() > 0) { |
|
|
|
// 查询在线设备那些开启了订阅,为设备开启定时的目录订阅
|
|
|
|