This commit is contained in:
yuhaiming
2026-05-09 10:12:36 +08:00
parent def9b89ecd
commit 39fe8065da
80 changed files with 3883 additions and 6102 deletions

View File

@@ -65,7 +65,7 @@ public interface Constants {
/**
* 验证码有效期(分钟)
*/
Integer CAPTCHA_EXPIRATION = 2;
Integer CAPTCHA_EXPIRATION = 5;
/**
* 顶级父级id

View File

@@ -16,6 +16,7 @@ public interface GlobalConstants {
* 验证码 redis key
*/
String CAPTCHA_CODE_KEY = GLOBAL_REDIS_KEY + "captcha_codes:";
String CAPTCHA_EMAIL_CODE_KEY = GLOBAL_REDIS_KEY + "captcha_email_codes:";
/**
* 防重提交 redis key

View File

@@ -0,0 +1,45 @@
package org.dromara.common.core.domain.model;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
/**
* 短信登录对象
*
* @author Lion Li
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class ForgotLoginBody extends LoginBody {
/**
* 手机号
*/
@NotBlank(message = "{user.phonenumber.not.blank}")
private String phonenumber;
/**
* 短信code
*/
@NotBlank(message = "{sms.code.not.blank}")
private String smsCode;
/**
* 用户名
*/
@NotBlank(message = "{user.username.not.blank}")
@Length(min = 2, max = 30, message = "{user.username.length.valid}")
private String username;
/**
* 用户密码
*/
@NotBlank(message = "{user.password.not.blank}")
@Length(min = 5, max = 30, message = "{user.password.length.valid}")
// @Pattern(regexp = RegexConstants.PASSWORD, message = "{user.password.format.valid}")
private String password;
}

View File

@@ -33,5 +33,9 @@ public class RegisterBody extends LoginBody {
* 用户类型
*/
private String userType;
/**
* 验证码
*/
private String code;
}