查询指定用户的流量统计信息。
GET /client/dynamics/account/stat/list
| 参数名 | 类型 | 描述 |
| x-merchant-token | String | 商户令牌 |
| x-merchant-code | String | 商户代码 |
| Content-Type | String | application/json |
| 参数名 | 必选 | 类型 | 描述 |
| accountId | 是 | Long | 用户账号ID |
| startTime | 是 | String | 开始时间(yyyy-MM-dd) |
| endTime | 是 | String | 结束时间(yyyy-MM-dd) |
{
"msg": "操作成功",
"code": 200,
"data": [
{
"requestsTotal": 0,
"trafficTotal": 0.02,
"dusage": "2025-07-22"
},
{
"requestsTotal": 0,
"trafficTotal": 0.01,
"dusage": "2025-07-23"
},
{
"requestsTotal": 0,
"trafficTotal": 2670.54,
"dusage": "2025-07-26"
},
{
"requestsTotal": 0,
"trafficTotal": 354.39,
"dusage": "2025-07-28"
}
]
}
// 使用 fetch 查询流量统计
fetch(' /client/dynamics/account/stat/list?accountId=123&startTime=2025-07-22&endTime=2025-07-28', {
method: 'GET',
headers: {
'x-merchant-token': 'your_token',
'x-merchant-code': 'your_code',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data));
| 参数名 | 类型 | 描述 |
| trafficTotal | BigDecimal | 流量总数(MB) |
| dUsage | String | 日期 |
- 部分账号支持查询当天的流量统计(startTime和endTime都设置为当天日期,分时返回yyyy-MM-dd hh:mm:ss格式的流量统计)