GET /admin/users/{user_id}/login-histories
获取指定用户的登录历史记录列表
身份认证 `bearerAuth` application/json
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
user_id |
path |
string |
是 |
|
|
|
用户ID |
page |
query |
integer |
否 |
1 |
|
|
页码 |
page_size |
query |
integer |
否 |
20 |
|
|
每页数量 |
引用的 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.LoginHistoryListResponse
service-identity/internal/handler/dto.LoginHistoryResponse
用户登录历史记录
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
browser |
string |
否 |
Chrome |
|
浏览器 |
created_at |
string |
否 |
2026-04-15T10:30:00Z |
|
登录时间 |
device_type |
string |
否 |
desktop |
|
设备类型 |
fail_reason |
string |
否 |
|
|
失败原因 |
id |
string |
否 |
hist_abc123 |
|
记录ID |
ip |
string |
否 |
192.168.1.1 |
|
IP地址 |
location |
string |
否 |
Beijing |
|
地理位置 |
login_type |
string |
否 |
password |
|
登录类型 |
os |
string |
否 |
Windows 10 |
|
操作系统 |
session_id |
string |
否 |
sess_123 |
|
会话ID |
status |
string |
否 |
success |
|
状态 |
tenant_id |
string |
否 |
tnt_xyz789 |
|
租户ID |
user_agent |
string |
否 |
Mozilla/5.0 |
|
User-Agent |
user_id |
string |
否 |
usr_abc123 |
|
用户ID |