mirror of https://gitee.com/stylefeng/roses
【captcha】更新校验的判断
parent
26b77b3e34
commit
af68c371f6
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue