update 优化新增证书

This commit is contained in:
lijiarao
2022-03-24 11:45:45 +08:00
parent bd14877588
commit a281dffe30
@@ -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