Browse Source

提交

mine
袁强 5 months ago
parent
commit
7912b91040
  1. 3
      yq-admin/src/main/java/yq/web/controller/nologin/NoLogin.java
  2. 4
      yq-common/src/main/java/yq/common/webSocket/MyWebSocketHandler.java

3
yq-admin/src/main/java/yq/web/controller/nologin/NoLogin.java

@ -99,7 +99,8 @@ public class NoLogin {
@GetMapping("/temp")
public Map<String, Object>tempMap(String id)
{
return redisCache.getCacheMap(id);
Map<String, Object> cacheMap = redisCache.getCacheMap(id);
return cacheMap;
}
//通过萤石云进行取流
@GetMapping("/list")

4
yq-common/src/main/java/yq/common/webSocket/MyWebSocketHandler.java

@ -59,13 +59,11 @@ public class MyWebSocketHandler implements WebSocketHandler {
Double temp1 = Convert.toDouble(cacheMap.get("temp"));
if(temp>temp1){
redisCache.setCacheMap(id,object);
redisCache.expire(id,120,TimeUnit.SECONDS);
}
}else {
redisCache.setCacheMap(id,object);
redisCache.expire(id,120,TimeUnit.SECONDS);
}
redisCache.expire(id,5,TimeUnit.SECONDS);
}
}

Loading…
Cancel
Save