作者 朱兆平

update: 新增通过token获取用户信息接口.供其他服务调用.

@@ -241,8 +241,8 @@ public class UserServiceImpl implements UserService{ @@ -241,8 +241,8 @@ public class UserServiceImpl implements UserService{
241 token = token.substring(7); // 7 是 "Bearer " 的长度 241 token = token.substring(7); // 7 是 "Bearer " 的长度
242 String userJsonStr = redisUtils.get(token); 242 String userJsonStr = redisUtils.get(token);
243 if (StringUtils.isNotEmpty(userJsonStr)) { 243 if (StringUtils.isNotEmpty(userJsonStr)) {
244 - USERS user = JSONObject.parseObject(userJsonStr, USERS.class);  
245 - userinfo = usersMapper.selectByPrimaryKey(user.getUserId()); 244 + userinfo = JSONObject.parseObject(userJsonStr, USERS.class);
  245 +// userinfo = usersMapper.selectByPrimaryKey(user.getUserId());
246 } 246 }
247 } 247 }
248 }catch (Exception e){ 248 }catch (Exception e){