!174 fix 修复 短信验证码校验逻辑错误

Merge pull request !174 from SPPan/dev
This commit is contained in:
疯狂的狮子Li 2022-05-07 07:21:50 +00:00 committed by Gitee
commit e1e26d53e6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -123,7 +123,7 @@ public class SysLoginService {
*/
private boolean validateSmsCode(String phonenumber, String smsCode, HttpServletRequest request) {
String code = RedisUtils.getCacheObject(Constants.CAPTCHA_CODE_KEY + phonenumber);
if (StringUtils.isNotBlank(code)) {
if (StringUtils.isBlank(code)) {
asyncService.recordLogininfor(phonenumber, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), request);
throw new CaptchaExpireException();
}