Commit e587a9cf authored by shiyu's avatar shiyu

完成登录

parent c6de442a
......@@ -112,7 +112,7 @@ public class CacheUtil {
*/
public AsyncLoadingCache<Long, String> appletUserCache = Caffeine.newBuilder()
.maximumSize(5000)
.expireAfterWrite(13, TimeUnit.MINUTES)
.expireAfterWrite(10, TimeUnit.SECONDS)
.buildAsync(k -> getAppletUserList(k));
......@@ -121,7 +121,7 @@ public class CacheUtil {
*/
public AsyncLoadingCache<Long, User> appletUserInfoCache = Caffeine.newBuilder()
.maximumSize(5000)
.expireAfterWrite(30, TimeUnit.MINUTES)
.expireAfterWrite(30, TimeUnit.SECONDS)
.buildAsync(k -> getAppletUsers(k));
......
......@@ -235,7 +235,7 @@ public class UserServiceImpl implements UserService {
result.put("isCollector", false);
}
//返回用户信息
user = cacheUtil.getAppletUserById(dto.getUserId());
user = userDao.queryById(dto.getUserId());
result.put("avatar", com.xxdxxs.utils.StringUtils.isEmpty(user.getAvatar()) ? CommConsts.DEFAULT_AVATAR_URL : user.getAvatar());
result.put("name", com.xxdxxs.utils.StringUtils.isEmpty(user.getNickname()) ? "微信用户" : user.getNickname());
result.put("background", com.xxdxxs.utils.StringUtils.isEmpty(user.getBackground()) ? CommConsts.DEFAULT_BACKGROUND_URL : user.getBackground());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment