|
@@ -787,11 +787,11 @@ public class DeviceEventServiceImpl implements DeviceEventService {
|
|
|
device.setKeepaliveTime(System.currentTimeMillis());
|
|
|
|
|
|
// 提取设备基本信息
|
|
|
- Map<String, Object> deviceBasicInfo = (Map<String, Object>) deviceInfo.get("device_info");
|
|
|
- if (deviceBasicInfo != null) {
|
|
|
- device.setDevType((String) deviceBasicInfo.get("device_type"));
|
|
|
- device.setSoftware((String) deviceBasicInfo.get("firmware"));
|
|
|
- device.setBluVer((String) deviceBasicInfo.get("blu_ver"));
|
|
|
+// Map<String, Object> deviceBasicInfo = (Map<String, Object>) deviceInfo.get("device_info");
|
|
|
+ if (deviceInfo != null) {
|
|
|
+ device.setDevType((String) deviceInfo.get("device_type"));
|
|
|
+ device.setSoftware((String) deviceInfo.get("firmware"));
|
|
|
+ device.setBluVer((String) deviceInfo.get("blu_ver"));
|
|
|
}
|
|
|
|
|
|
// 提取区域信息
|
|
@@ -829,16 +829,16 @@ public class DeviceEventServiceImpl implements DeviceEventService {
|
|
|
* 从登录信息更新设备信息
|
|
|
*/
|
|
|
private void updateDeviceInfoFromLogin(Device device, Map<String, Object> deviceInfo, Map<String, Object> extRegion, Map<String, Object> sensorLocation) {
|
|
|
- Map<String, Object> deviceBasicInfo = (Map<String, Object>) deviceInfo.get("device_info");
|
|
|
- if (deviceBasicInfo != null) {
|
|
|
- if (deviceBasicInfo.containsKey("device_type")) {
|
|
|
- device.setDevType((String) deviceBasicInfo.get("device_type"));
|
|
|
+// Map<String, Object> deviceBasicInfo = (Map<String, Object>) deviceInfo.get("device_info");
|
|
|
+ if (deviceInfo != null) {
|
|
|
+ if (deviceInfo.containsKey("device_type")) {
|
|
|
+ device.setDevType((String) deviceInfo.get("device_type"));
|
|
|
}
|
|
|
- if (deviceBasicInfo.containsKey("firmware")) {
|
|
|
- device.setSoftware((String) deviceBasicInfo.get("firmware"));
|
|
|
+ if (deviceInfo.containsKey("firmware")) {
|
|
|
+ device.setSoftware((String) deviceInfo.get("firmware"));
|
|
|
}
|
|
|
- if (deviceBasicInfo.containsKey("blu_ver")) {
|
|
|
- device.setBluVer((String) deviceBasicInfo.get("blu_ver"));
|
|
|
+ if (deviceInfo.containsKey("blu_ver")) {
|
|
|
+ device.setBluVer((String) deviceInfo.get("blu_ver"));
|
|
|
}
|
|
|
}
|
|
|
|