diff --git a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxUserMemberServiceImpl.java b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxUserMemberServiceImpl.java index 4bfdfbd..94ae0c4 100644 --- a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxUserMemberServiceImpl.java +++ b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxUserMemberServiceImpl.java @@ -222,32 +222,17 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService { @Override @Transactional(propagation = Propagation.SUPPORTS) public LoginUserVo refreshWxUserInfo() { - // 1、获取用户最新信息 String openid = SecurityUtils.getLoginUser().getWxUserMember().getOpenid(); WxUserMember wxUserMember = wxUserMemberMapper.selectWxUserMemberByOpenId(openid); if (wxUserMember == null) { logger.error("刷新用户信息失败"); throw new ServiceException("刷新用户信息失败"); } - String sessionKey = redisService.getCacheObject(CacheConstants.WX_SESSION_KEY_CACHE + wxUserMember.getOpenid()); - wxUserMember.getParams().put(CacheConstants.WX_SESSION_KEY_CACHE + wxUserMember.getOpenid(), sessionKey); - return login(wxUserMember); - - // 2、刷新redis缓存信息 -// String userKey = SecurityUtils.getUserKey(); -// LoginUser loginUser = redisService.getCacheObject(CacheConstants.LOGIN_TOKEN_KEY + userKey); -// loginUser.setWxUserMember(wxUserMember); -// loginUser.setWxUserid(wxUserMember.getId()); -// loginUser.setUsername(wxUserMember.getNickname()); -// loginUser.setExpireTime(loginUser.getLoginTime() + CacheConstants.EXPIRATION * 60 * 1000); -// redisService.setCacheObject(userKey, loginUser, CacheConstants.EXPIRATION, TimeUnit.MINUTES); -// -// // 3、构建前端缓存对象 -// LoginUserVo loginUserVo = new LoginUserVo(); -// BeanUtils.copyProperties(wxUserMember, loginUserVo); -// loginUserVo.setToken(loginUser.getToken()); -// return loginUserVo; + LoginUserVo loginUserVo = new LoginUserVo(); + BeanUtils.copyProperties(wxUserMember, loginUserVo); + loginUserVo.setToken(null); + loginUserVo.setIntegralText(null); + return loginUserVo; } - }