docs(api): 更新电池分页接口说明

This commit is contained in:
2026-05-11 23:16:59 +08:00
parent c533113229
commit a8e3cf5f4b
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -62,8 +62,8 @@ Rules:
- Do not add mock/fallback rows. If MySQL is unavailable, surface the error.
- `is_low_power` is stored as a string and normalized to boolean in `src/domain/battery.ts`.
- `power_status` is normalized to `0 | 1 | 2`.
- Without `mac`, battery list queries return the latest record per `mac`.
- With `mac`, battery list queries return history ordered by `create_time DESC, id DESC`, limited to 500 rows.
- `battery.batteries` returns paginated latest records per `mac`; supported filters are `pageSize`, `cursor`, `search`, `lowPower`, `powerStatus`, and `sort`.
- `battery.history` takes `mac` and returns history ordered by `create_time DESC, id DESC`, limited to 500 rows.
- Dashboard may call the external prediction API when `SOH_PREDICTION_API_BASE_URL` is configured. Prediction results are cached in memory by `mac` and latest history record.
## Layout
@@ -91,6 +91,7 @@ src/
- Current business API:
- `battery.dashboard`
- `battery.batteries`
- `battery.history`
## CLI And Deploy