forked from iVMiku/guidance-backend
fix: 缓存读取
This commit is contained in:
@@ -114,4 +114,12 @@ public class RedisUtil {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public void insertKey(String openid, String sessionKey) {
|
||||
redisTemplate.opsForValue().set("sessionkey:" + openid, sessionKey);
|
||||
}
|
||||
|
||||
public String getKey(String userId) {
|
||||
return (String) redisTemplate.opsForValue().get("sessionkey:" + userId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user