refactor: 将验证码唯一标识格式从无符号 UUID 调整为带符号 UUID

This commit is contained in:
Charles7c 2023-08-15 00:26:05 +08:00
parent 190385ed36
commit a61196cd62
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ public class CaptchaVO implements Serializable {
/**
* 验证码标识
*/
@Schema(description = "验证码标识", example = "8a5a0296acd141a8b1bd789da867bc1a")
@Schema(description = "验证码标识", example = "090b9a2c-1691-4fca-99db-e4ed0cff362f")
private String uuid;
/**

View File

@ -61,7 +61,7 @@ public class LoginRequest implements Serializable {
/**
* 验证码标识
*/
@Schema(description = "验证码标识", example = "8a5a0296acd141a8b1bd789da867bc1a")
@Schema(description = "验证码标识", example = "090b9a2c-1691-4fca-99db-e4ed0cff362f")
@NotBlank(message = "验证码标识不能为空")
private String uuid;
}

View File

@ -75,7 +75,7 @@ public class CaptchaController {
Captcha captcha = captchaImage.getCaptcha();
// 保存验证码
String uuid = IdUtil.fastSimpleUUID();
String uuid = IdUtil.fastUUID();
String captchaKey = RedisUtils.formatKey(CacheConsts.CAPTCHA_KEY_PREFIX, uuid);
RedisUtils.setCacheObject(captchaKey, captcha.text(),
Duration.ofMinutes(captchaImage.getExpirationInMinutes()));