fix: resolve jt808 phone without leading zero

This commit is contained in:
lingniu
2026-07-01 22:34:47 +08:00
parent eb48d16181
commit 6b55694c43
2 changed files with 26 additions and 1 deletions

View File

@@ -105,6 +105,9 @@ func CandidateKeys(env envelope.FrameEnvelope) []CandidateKey {
out = append(out, CandidateKey{Column: column, Value: value})
}
add("phone", env.Phone)
if trimmed := strings.TrimLeft(strings.TrimSpace(env.Phone), "0"); trimmed != "" {
add("phone", trimmed)
}
add("device_id", env.DeviceID)
add("plate", env.Plate)
add("vin", env.VehicleKeyHint)