【captcha】更新校验的判断

pull/3/head
fengshuonan 2021-01-16 10:41:47 +08:00
parent 26b77b3e34
commit af68c371f6
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ public class AuthServiceImpl implements AuthServiceApi {
if (StrUtil.isEmpty(verKey) || StrUtil.isEmpty(verCode)) { if (StrUtil.isEmpty(verKey) || StrUtil.isEmpty(verCode)) {
throw new AuthException(ValidatorExceptionEnum.CAPTCHA_EMPTY); throw new AuthException(ValidatorExceptionEnum.CAPTCHA_EMPTY);
} }
if (captchaApi.validateCaptcha(verKey, verCode)) { if (!captchaApi.validateCaptcha(verKey, verCode)) {
throw new AuthException(ValidatorExceptionEnum.CAPTCHA_EMPTY); throw new AuthException(ValidatorExceptionEnum.CAPTCHA_EMPTY);
} }
} }

View File

@ -61,7 +61,7 @@ public class SysSmsInfoServiceImpl extends ServiceImpl<SysSmsMapper, SysSms> imp
if (StrUtil.isEmpty(verKey) || StrUtil.isEmpty(verCode)) { if (StrUtil.isEmpty(verKey) || StrUtil.isEmpty(verCode)) {
throw new SystemModularException(ValidatorExceptionEnum.CAPTCHA_EMPTY); throw new SystemModularException(ValidatorExceptionEnum.CAPTCHA_EMPTY);
} }
if (captchaApi.validateCaptcha(verKey, verCode)) { if (!captchaApi.validateCaptcha(verKey, verCode)) {
throw new SystemModularException(ValidatorExceptionEnum.CAPTCHA_ERROR); throw new SystemModularException(ValidatorExceptionEnum.CAPTCHA_ERROR);
} }