refactor(go): make daily metric totals opt in
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
- 原因:日统计是正式业务指标,应只统计已经定位到 VIN 的车辆。
|
||||
- 无 VIN 的 JT808 等数据保留在 raw/Redis/session 中用于排查和待绑定,不进入正式车辆指标。
|
||||
- 状态:schema 使用 `PRIMARY KEY (vin, stat_date, protocol)`,不保留自增 `id` 和 `created_at`;首末总里程和样本数保留为日里程计算状态。
|
||||
- 查询:`/api/stats/daily-metrics` 默认不执行 `COUNT(*)`,`total` 表示本页返回条数;只有报表总页数等场景传 `includeTotal=true`。
|
||||
- 生产:RDS 已在上线前删除泛化 `vehicle_daily_metric`,改为专用 `vehicle_daily_mileage`。
|
||||
|
||||
4. `vehicle_locations` 不再接收临时身份兜底字段。
|
||||
|
||||
Reference in New Issue
Block a user