refactor: 将验证码唯一标识格式从无符号 UUID 调整为带符号 UUID
This commit is contained in:
parent
190385ed36
commit
a61196cd62
@ -39,7 +39,7 @@ public class CaptchaVO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 验证码标识
|
* 验证码标识
|
||||||
*/
|
*/
|
||||||
@Schema(description = "验证码标识", example = "8a5a0296acd141a8b1bd789da867bc1a")
|
@Schema(description = "验证码标识", example = "090b9a2c-1691-4fca-99db-e4ed0cff362f")
|
||||||
private String uuid;
|
private String uuid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,7 +61,7 @@ public class LoginRequest implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 验证码标识
|
* 验证码标识
|
||||||
*/
|
*/
|
||||||
@Schema(description = "验证码标识", example = "8a5a0296acd141a8b1bd789da867bc1a")
|
@Schema(description = "验证码标识", example = "090b9a2c-1691-4fca-99db-e4ed0cff362f")
|
||||||
@NotBlank(message = "验证码标识不能为空")
|
@NotBlank(message = "验证码标识不能为空")
|
||||||
private String uuid;
|
private String uuid;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public class CaptchaController {
|
|||||||
Captcha captcha = captchaImage.getCaptcha();
|
Captcha captcha = captchaImage.getCaptcha();
|
||||||
|
|
||||||
// 保存验证码
|
// 保存验证码
|
||||||
String uuid = IdUtil.fastSimpleUUID();
|
String uuid = IdUtil.fastUUID();
|
||||||
String captchaKey = RedisUtils.formatKey(CacheConsts.CAPTCHA_KEY_PREFIX, uuid);
|
String captchaKey = RedisUtils.formatKey(CacheConsts.CAPTCHA_KEY_PREFIX, uuid);
|
||||||
RedisUtils.setCacheObject(captchaKey, captcha.text(),
|
RedisUtils.setCacheObject(captchaKey, captcha.text(),
|
||||||
Duration.ofMinutes(captchaImage.getExpirationInMinutes()));
|
Duration.ofMinutes(captchaImage.getExpirationInMinutes()));
|
||||||
|
Loading…
Reference in New Issue
Block a user