GET /auth/me/audit-logs
分页查询当前用户的操作审计日志,支持按时间范围、操作类型、关键词与状态语义筛选
身份认证 `bearerAuth` application/json
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
page |
query |
integer |
否 |
1 |
|
|
页码 |
page_size |
query |
integer |
否 |
20 |
|
|
每页条数 |
start_date |
query |
string |
否 |
|
|
|
开始日期 |
end_date |
query |
string |
否 |
|
|
|
结束日期 |
action |
query |
string |
否 |
|
|
|
操作类型 |
keyword |
query |
string |
否 |
|
|
|
关键词(IP/设备/详情) |
status_class |
query |
string |
否 |
|
|
|
状态语义筛选 success/failure |
引用的 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.AuditLogListResponse
service-identity/internal/handler/dto.AuditLogResponse
审计日志记录
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
action |
string |
否 |
user.login |
|
Action |
created_at |
string |
否 |
2026-04-15T10:30:00Z |
|
时间 |
details |
string |
否 |
details |
|
Details |
id |
string |
否 |
audit_abc123 |
|
日志ID |
ip |
string |
否 |
192.168.1.1 |
|
IP |
resource |
string |
否 |
session |
|
Resource |
resource_id |
string |
否 |
sess_123 |
|
Resource ID |
status |
string |
否 |
success |
|
状态:success/failed;空串=未知(ADR-06) |
tenant_id |
string |
否 |
tnt_xyz789 |
|
租户ID |
user_agent |
string |
否 |
Mozilla/5.0 |
|
User-Agent |
user_id |
string |
否 |
usr_abc123 |
|
用户ID |