作者 朱兆平

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

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