GET /admin/users

获取租户下的用户列表,支持按状态和关键字搜索

身份认证 `bearerAuth` application/json

请求参数

名称位置类型必填默认值示例约束描述
status query string 否 用户状态
search query string 否 搜索关键字
page query integer 否 1 页码
limit query integer 否 20 每页数量

响应

状态描述Schema
200用户列表service-identity/internal/handler/dto.UserListResponse

引用的 Schema

service-core/base/dto.PageInfo

字段类型必填示例约束描述
has_next boolean 否 HasNext indicates whether there is a next page
has_prev boolean 否 HasPrev indicates whether there is a previous page
page integer 否 Page is the current page number (1-based)
page_size integer 否 PageSize is the number of items per page
total integer 否 Total is the total number of items across all pages
total_pages integer 否 TotalPages is the total number of pages

service-identity/internal/handler/dto.AuthUserResponse

认证用户信息

字段类型必填示例约束描述
age_group string 否 年龄分组
birth_date string 否 出生日期 (RFC3339)
created_at string 否 2026-01-01T00:00:00Z 创建时间
email string 否 john@example.com 邮箱
email_verified_at string 否 2026-01-10T08:00:00Z 邮箱验证时间
id string 否 usr_abc123 用户ID
is_minor boolean 否 是否未成年人
last_login_at string 否 2026-04-14T10:30:00Z 最后登录
last_login_ip string 否 192.168.1.1 最后登录IP
locked_until string 否 2026-04-15T12:00:00Z 锁定截止
login_fail_count integer 否 0 失败次数
metadata object 否 扩展元数据
mfa_enabled boolean 否 False 是否启用MFA
mfa_type string 否 totp MFA类型
must_change_password boolean 否 False 需要强制修改密码
password_changed_at string 否 密码最后修改时间
pending_parental_consent boolean 否 是否等待家长同意
phone string 否 13800138000 手机号
phone_verified_at string 否 2026-01-10T08:00:00Z 手机验证时间
status string 否 active 状态
tenant_id string 否 tnt_xyz789 租户ID
updated_at string 否 2026-04-10T14:20:00Z 更新时间
username string 否 john_doe 用户名

service-identity/internal/handler/dto.UserListResponse

字段类型必填示例约束描述
code integer 否
items array of

参见 service-identity/internal/handler/dto.AuthUserResponse

否 统一使用 items
message string 否
pagination object 否 分页信息(嵌套对象)
timestamp string 否
total integer 否 总条数(平铺,便于直接读取)