Commit 22703e21 authored by licc's avatar licc

自测

parent 6bc45fc6
......@@ -51,7 +51,7 @@ public class LoginServiceImpl implements LoginService {
}
//1、检验验证码是否正确
String key = "";
String key = StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX, Constants.RedisKey.SMS_PRIFIX, userVo.getUserId(), 0 + "");
String redisCode = redisUtils.getValue(key);
if (StringUtils.isBlank(redisCode) || !userVo.getSms().equals(redisCode)) {
return R.error("验证码错误!");
......
......@@ -265,7 +265,8 @@ public class LoginController {
}
//1、检验验证码是否正确
String key = "";
String key = StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX, Constants.RedisKey.SMS_PRIFIX,
userVo.getUserId(), Constants.Sms.CodeType.LOGIN_OR_REGISTER + "");
String redisCode = redisUtils.getValue(key);
if (StringUtils.isBlank(redisCode) || !userVo.getSms().equals(redisCode)) {
return R.error("验证码错误!");
......
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