Commit 58d4e68c authored by yaobaizheng's avatar yaobaizheng

手机号登陆时将token放在redis上

parent 7466cacc
......@@ -129,7 +129,9 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
if (!code.equals(msgCode)) {
throw new ServiceException("验证码有误");
}
return JwtTokenUtil.createToken(sysUserInfo, null);
String token = JwtTokenUtil.createToken(sysUserInfo, null);
RedisUtil.set(Constants.token + token, sysUserInfo.getUserId(), 15, TimeUnit.DAYS);
return token;
}
/**
* @description: 获取验证码 如果需要类型 则在key上拼接 type :Constants.MSG_KEY + sendPhoneVo.getType() + ":" +
......
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