优化处理
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
package com.emotionmuseum.auth.request;
|
||||
|
||||
import com.emotionmuseum.common.request.BaseRequest;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 重置密码请求
|
||||
*
|
||||
* <p>用于未登录情况下通过手机号与验证码(本期固定为 123456)设置新密码。</p>
|
||||
*
|
||||
* @author emotion-museum
|
||||
* @since 2025-10-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "重置密码请求")
|
||||
public class ResetPasswordRequest extends BaseRequest {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Schema(description = "手机号", example = "13800138000")
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 新密码
|
||||
*/
|
||||
@Schema(description = "新密码", example = "NewPass_123")
|
||||
@NotBlank(message = "新密码不能为空")
|
||||
@Size(min = 6, max = 20, message = "密码长度必须在6-20位之间")
|
||||
private String newPassword;
|
||||
|
||||
/**
|
||||
* 验证码(本期为固定值 123456)
|
||||
*/
|
||||
@Schema(description = "验证码(固定为123456)", example = "123456")
|
||||
@NotBlank(message = "验证码不能为空")
|
||||
private String captcha;
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.emotionmuseum.auth.response;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 重置密码响应
|
||||
*
|
||||
* <p>不返回敏感信息,仅提供结果标识与提示。</p>
|
||||
*
|
||||
* @author emotion-museum
|
||||
* @since 2025-10-26
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "重置密码响应")
|
||||
public class ResetPasswordResponse {
|
||||
|
||||
/** 是否重置成功 */
|
||||
@Schema(description = "是否重置成功", example = "true")
|
||||
private boolean success;
|
||||
|
||||
/** 提示信息 */
|
||||
@Schema(description = "提示信息", example = "重置密码成功")
|
||||
private String message;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user