You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.9 KiB

5 hours ago
meta {
name: 用户操作日志分页
type: http
seq: 1
tags: [
generated
]
}
post {
url: {{baseUrl}}/api/log/operation/page
body: formUrlEncoded
auth: inherit
}
body:form-urlencoded {
current: 1
size: 10
deptName: 广东
operatorName: 陈亚
timeFrom: 2026-09-01
timeTo: 2026-09-08
opType: 新增
orderBy: opTime
asc: false
}
docs {
# 用户操作日志分页
`POST /api/log/operation/page`
用户操作日志分页(A7-4-1 列表,操作时间倒序,需 ADMIN 角色)。
## 请求参数
| 参数 | 类型 | 必填 | 默认 | 说明 |
| --- | --- | --- | --- | --- |
| current | int | 否 | 1 | 当前页码,从 1 开始 |
| size | int | 否 | 10 | 每页条数,上限 500 |
| orderBy | string | 否 | - | 排序字段,驼峰或下划线均可 |
| asc | boolean | 否 | false | 是否升序(默认操作时间倒序) |
| deptName | string | 否 | - | 所属组织模糊匹配(部门名称关键词) |
| operatorName | string | 否 | - | 操作人姓名模糊匹配 |
| timeFrom | date | 否 | - | 操作时间起(含当天 00:00:00) |
| timeTo | date | 否 | - | 操作时间讫(含当天 23:59:59) |
| opType | string | 否 | - | 操作类型:登录/查询/新增/修改/删除/处理/导入/导出;null=全部 |
## 请求示例
请求头:Authorization: Bearer {{token}}
Content-Type: application/x-www-form-urlencoded
POST /api/log/operation/page
current=1&size=10&deptName=广东&operatorName=陈亚&timeFrom=2026-09-01&timeTo=2026-09-08&opType=新增&orderBy=opTime&asc=false
## 响应 data 结构
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| content[] | array<object> | 用户操作日志列表 |
| id | string | 日志 id |
| opTime | datetime | 操作时间 |
| operatorName | string | 操作人姓名快照 |
| deptName | string | 所属组织快照 |
| account | string | 账号快照 |
| ip | string | 操作 IP 地址 |
| opType | string | 操作类型(8 枚举) |
| content | string | 操作内容(URI 或语义描述) |
| result | string | 操作结果:成功/失败 |
| total | long | 总条数 |
| size | long | 每页条数 |
| current | long | 当前页码 |
| pages | long | 总页数 |
| empty | boolean | 是否为空结果 |
## 响应示例
// 示例数据,字段结构以上表为准,非真实返回
```json
{
"code": 0,
"success": true,
"message": "success",
"data": {
"content": [
{
"id": "1",
"opTime": "2026-09-08 10:30:00",
"operatorName": "陈亚",
"deptName": "广东10部",
"account": "chenya88",
"ip": "192.168.1.10",
"opType": "新增",
"content": "/api/customer/save",
"result": "成功"
}
],
"total": 1,
"size": 10,
"current": 1,
"pages": 1,
"empty": false
}
}
```
}