feat: 实现完整的 RBAC 权限管理系统与基础设施增强

在初始认证基础上,新增完整的 RBAC 权限模型(角色、权限、菜单三级管理),
  集成审计日志、接口限流、登录失败锁定、Refresh Token 机制、Redis 分布式缓存与锁、
  RocketMQ 消息队列,并引入 Flyway 数据库版本管理,同时补充项目文档与使用示例
This commit is contained in:
2026-04-10 10:58:22 +08:00
parent 3a9bf61839
commit 40c85c3c1f
97 changed files with 13434 additions and 351 deletions

View File

@@ -1,24 +1,59 @@
package com.aisi.template.domain.dto;
import com.aisi.template.annotation.StrongPassword;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
/**
* 用户数据传输对象
* 用于用户注册和登录请求
*
* 验证规则:
* - 用户名2-50 位字符,不能为空
* - 密码:不能为空,需满足强密码要求(@StrongPassword
* - 邮箱:可选,注册时建议提供
*
* 使用场景:
* - 用户注册:需要用户名、密码、邮箱
* - 用户登录:需要用户名、密码
*
* @author Claude
* @since 2024-04-09
*/
@Data
@Schema(description = "用户注册/登录请求")
public class UserDto {
/**
* 用户名
* - 长度2-50 位字符
* - 不能为空
* - 示例admin, user01
*/
@NotBlank(message = "用户名不能为空")
@Size(min = 2, max = 50, message = "用户名长度必须在 2-50 位之间")
@Schema(description = "用户名", example = "admin")
private String username;
/**
* 密码
* - 不能为空
* - 需满足强密码要求:包含大小写字母、数字、特殊字符
* - 示例Password123!
*/
@NotBlank(message = "密码不能为空")
@Size(min = 6, max = 64, message = "密码长度必须在 6-64 位之间")
@Schema(description = "密码", example = "123456")
@StrongPassword
@Schema(description = "密码", example = "Password123!")
private String password;
/**
* 邮箱地址
* - 可选字段
* - 注册时建议提供,用于找回密码
* - 示例user@example.com
*/
@Schema(description = "邮箱(注册时可选)", example = "user@example.com")
private String email;
}