feat(platform): expose realtime service status

This commit is contained in:
lingniu
2026-07-04 02:08:31 +08:00
parent 526377c13f
commit 6b1e36a5a6
11 changed files with 220 additions and 28 deletions

View File

@@ -529,6 +529,21 @@ func buildVehicleCoverageServiceStatus(row VehicleCoverageRow) *VehicleServiceSt
}
}
func buildRealtimeServiceStatus(row VehicleRealtimeRow) *VehicleServiceStatus {
return buildVehicleCoverageServiceStatus(VehicleCoverageRow{
VIN: row.VIN,
Plate: row.Plate,
Phone: row.Phone,
OEM: row.OEM,
Protocols: row.Protocols,
SourceCount: row.SourceCount,
OnlineSourceCount: row.OnlineSourceCount,
Online: row.Online,
LastSeen: row.LastSeen,
BindingStatus: row.BindingStatus,
})
}
func sourceCoverageDetail(sourceCount int, onlineSourceCount int, suffix string) string {
return strconv.Itoa(onlineSourceCount) + "/" + strconv.Itoa(sourceCount) + " 个来源在线," + suffix
}