仓库数据统计
按仓库汇总出入库、库容等数据,做仓库报表时用。
| 请求方式 | GET/POST |
| 接口路径 | /api/warehouse/stats/list |
| Content-Type | application/json |
| 鉴权 | X-Nideshop-Token |
请求体字段
| 字段 | 类型 | 必填 | 说明 |
warehouseIds | Array<Integer> | 否 | 仓库 ID 列表,空则表示当前用户下的全部仓库 |
dateType | String | 否 | 时间粒度: today / yesterday / last7days / month / custom |
startTime | LocalDateTime | 否 | 自定义时间范围,在 dateType = custom 时生效 |
endTime | LocalDateTime | 否 | - |
curPage | Integer | 否 | 分页 |
pageSize | Integer | 否 | - |
curl 调用
curl -s 'https://www.8shu8.com/api/warehouse/stats/list' \
-H 'X-Nideshop-Token: YOUR_LOGIN_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"warehouseIds": [
1
],
"dateType": "string",
"startTime": "string",
"endTime": "string",
"curPage": 1,
"pageSize": 1
}'
响应示例
data 为分页对象,业务数据在 records。
{
"code": 200,
"message": "操作成功",
"success": true,
"data": {
"records": [
"..."
],
"total": 0,
"size": 10,
"current": 1,
"pages": 0
}
}
返回字段(data)
| 字段 | 类型 | 说明 |
page | 分页对象 | 分页数据 |
totalShippedAmount | BigDecimal | 当前结果集的合计 |
totalShippedOrderCount | Long | - |
totalShippedBookCount | Long | - |
totalPendingAmount | BigDecimal | - |