feat(platform): expose realtime service status
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user