|
@@ -32,6 +32,7 @@ import java.util.stream.Collectors;
|
|
|
@Component
|
|
|
public class RedisLikeService {
|
|
|
|
|
|
+
|
|
|
private final RedisServer redisServer;
|
|
|
|
|
|
public final static String SCROLLING_MESSAGES = "scrollingMessages";
|
|
@@ -222,7 +223,7 @@ public class RedisLikeService {
|
|
|
}
|
|
|
|
|
|
public void setUserInfo(UserInfo us) {
|
|
|
- redisServer.setData(StrUtil.format(US_INFO_KEY, us.getCode()), us);
|
|
|
+ redisServer.setData(RedisServer.USER_INFO(us.getCode()), us);
|
|
|
}
|
|
|
|
|
|
public Set<String> getDept(boolean needPartTimeDept, UserInfo userInfo) {
|
|
@@ -274,7 +275,7 @@ public class RedisLikeService {
|
|
|
if (StringUtil.invalidValue(code)) {
|
|
|
return null;
|
|
|
}
|
|
|
- return redisServer.getData(StrUtil.format(US_INFO_KEY, code), () -> dbUserInfo(code));
|
|
|
+ return redisServer.getData(RedisServer.USER_INFO(code), () -> dbUserInfo(code));
|
|
|
}
|
|
|
|
|
|
public UserInfo getUserInfoByToken() {
|
|
@@ -328,7 +329,7 @@ public class RedisLikeService {
|
|
|
}
|
|
|
|
|
|
public void updateUserInfo(String code) {
|
|
|
- String key = StrUtil.format(US_INFO_KEY, code);
|
|
|
+ String key = RedisServer.USER_INFO(code);
|
|
|
UserInfo us = redisServer.getData(key);
|
|
|
if (us == null) {
|
|
|
return;
|