验证码调整
This commit is contained in:
@@ -57,7 +57,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
|||||||
SpecCaptcha captcha = new SpecCaptcha(130, 48, 4);
|
SpecCaptcha captcha = new SpecCaptcha(130, 48, 4);
|
||||||
|
|
||||||
// 获取验证码文本
|
// 获取验证码文本
|
||||||
String code = captcha.text();
|
String code = captcha.text().toLowerCase();
|
||||||
|
|
||||||
// 生成唯一的验证码 ID
|
// 生成唯一的验证码 ID
|
||||||
String captchaKey = IdUtil.randomUUID();
|
String captchaKey = IdUtil.randomUUID();
|
||||||
@@ -71,7 +71,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
|||||||
@Override
|
@Override
|
||||||
public LoginVO login(SysLoginDTO loginDTO) {
|
public LoginVO login(SysLoginDTO loginDTO) {
|
||||||
Object code = redisService.get(RedisCst.LOGIN_CODE + loginDTO.uuid());
|
Object code = redisService.get(RedisCst.LOGIN_CODE + loginDTO.uuid());
|
||||||
if (!"666666".equals(loginDTO.code()) && code == null || !code.equals(loginDTO.code())) {
|
if (!"666666".equals(loginDTO.code()) && (code == null || !code.equals(loginDTO.code().toLowerCase()))) {
|
||||||
throw new ApiNotPrintException("验证码错误");
|
throw new ApiNotPrintException("验证码错误");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user