|
|
@@ -21,15 +21,15 @@ public class DeviceconnCacheService {
|
|
|
private RedisTemplate redisTemplate;
|
|
|
|
|
|
public void setCache(IotDeviceconn iotDeviceconn){
|
|
|
- log.error("【设备连接缓存】保存设备连接信息缓存,设备链接信息标识:{}",iotDeviceconn.getDevconnBid());
|
|
|
+ log.info("【设备连接缓存】保存设备连接信息缓存,设备链接信息标识:{}",iotDeviceconn.getDevconnBid());
|
|
|
redisTemplate.opsForValue().set(getKey(RedisCacheKey.IOT_DEVICE_CONN)+iotDeviceconn.getDevconnBid(),iotDeviceconn);
|
|
|
}
|
|
|
public void deleteCache(IotDeviceconn iotDeviceconn){
|
|
|
- log.error("【设备连接缓存】删除设备连接信息缓存,设备链接信息标识:{}",iotDeviceconn.getDevconnBid());
|
|
|
+ log.info("【设备连接缓存】删除设备连接信息缓存,设备链接信息标识:{}",iotDeviceconn.getDevconnBid());
|
|
|
redisTemplate.delete(getKey(RedisCacheKey.IOT_DEVICE_CONN)+iotDeviceconn.getDevconnBid());
|
|
|
}
|
|
|
public IotDeviceconn getIotDeviceConnByDevconnBid(String devconnBid){
|
|
|
- log.error("【设备连接缓存】查询设备连接信息,设备连接标识为:{}",devconnBid);
|
|
|
+ log.info("【设备连接缓存】查询设备连接信息,设备连接标识为:{}",devconnBid);
|
|
|
// 首先查询出当前设备的连接信息
|
|
|
IotDeviceconn iotDeviceconn = (IotDeviceconn) redisTemplate.opsForValue().get(getKey(RedisCacheKey.IOT_DEVICE_CONN)+devconnBid);
|
|
|
if(null == iotDeviceconn){
|