This commit is contained in:
lijiarao
2022-03-30 14:13:58 +08:00
parent c5440c5e5f
commit 16ee8693a1
@@ -182,18 +182,18 @@ public class CompanyLoginController {
} catch (Exception e) {
e.printStackTrace();
}
//String captcha = sysLoginModel.getCaptcha();
//if (captcha == null) {
// result.error500("验证码无效");
// return result;
//}
//Object checkCode = redisUtil.get("_verification:_phone:" + phone);
//if (checkCode == null || !Objects.equals(checkCode,captcha)) {
// result.error500("验证码错误");
// return result;
//} else {
// redisUtil.del("_verification:_phone:" + phone);
//}
String captcha = sysLoginModel.getCaptcha();
if (captcha == null) {
result.error500("验证码无效");
return result;
}
Object checkCode = redisUtil.get("_verification:_phone:" + phone);
if (checkCode == null || !Objects.equals(checkCode,captcha)) {
result.error500("验证码错误");
return result;
} else {
redisUtil.del("_verification:_phone:" + phone);
}
//1. 校验用户是否有效
//update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false