forked from dyf/fys-Multi-tenant
app设备列表查询,新增纬度经度
This commit is contained in:
@ -141,6 +141,15 @@ public class AppDeviceBizService {
|
||||
item.setBattery("0");
|
||||
}
|
||||
|
||||
String location = RedisUtils.getCacheObject(GLOBAL_REDIS_KEY+DeviceRedisKeyConstants.DEVICE_LOCATION_KEY_PREFIX + item.getDeviceImei());
|
||||
// 获取电量
|
||||
if(StringUtils.isNotBlank(location)){
|
||||
JSONObject jsonObject = JSONObject.parseObject(location);
|
||||
item.setLatitude(jsonObject.getString("latitude"));
|
||||
item.setLongitude(jsonObject.getString("longitude"));
|
||||
}else{
|
||||
item.setBattery("0");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -323,7 +332,8 @@ public class AppDeviceBizService {
|
||||
}
|
||||
|
||||
// 获取经度纬度
|
||||
String locationInfo = GlobalConstants.GLOBAL_REDIS_KEY+DeviceRedisKeyConstants.DEVICE_LOCATION_KEY_PREFIX + device.getDeviceImei();
|
||||
String locationKey = GlobalConstants.GLOBAL_REDIS_KEY+DeviceRedisKeyConstants.DEVICE_LOCATION_KEY_PREFIX + device.getDeviceImei();
|
||||
String locationInfo = RedisUtils.getCacheObject(locationKey);
|
||||
if(StringUtils.isNotBlank(locationInfo)){
|
||||
JSONObject jsonObject = JSONObject.parseObject(locationInfo);
|
||||
vo.setLongitude((String)jsonObject.get("longitude"));
|
||||
|
Reference in New Issue
Block a user