Fix 9 backend bugs: pricing, zones, geocoding, device tokens, assignment retry

- pricingid null: lookupDoormilePrice now returns matched rule ID; wired to BookingServiceOption.Pricingid
- Zone rename: Interstate→Regional, OtherState→National throughout (code + DB migrated)
- Zone from pincodes: CheckPrice now accepts pickup_pincode+delivery_pincode and auto-resolves zone
- Delivery geocoding: pincodeToLatLon() maps 3-digit prefix to city coords when lat/lon are 0
- Device tokens: device_token field added to PinVerify DTOs; saved on both customer and miler login
- Assignment retry: RejectMilerAssignment now re-triggers AssignCustomerMiler/AssignCRMMiler immediately
- Provider empty B2C: defaults to Doormile when no pricing provider row matches
- City gate 422→400: StatusUnprocessableEntity corrected to StatusBadRequest
- Miler GPS 0,0: WS tracking falls back to MilerProfile DB coords when Redis key is expired

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 11:47:41 +05:30
parent c91c887726
commit 9d409a0d85
9 changed files with 116 additions and 40 deletions

View File

@@ -15,9 +15,10 @@ type CustomerLoginRequest struct {
}
type CustomerPinVerifyRequest struct {
Phone string `json:"phone" xml:"phone" form:"phone"`
Pin string `json:"pin" xml:"pin" form:"pin"`
Configid int `json:"configid"`
Phone string `json:"phone" xml:"phone" form:"phone"`
Pin string `json:"pin" xml:"pin" form:"pin"`
Configid int `json:"configid"`
DeviceToken string `json:"device_token"`
}
type CustomerResetPinRequest struct {
@@ -32,9 +33,10 @@ type MilerLoginRequest struct {
}
type MilerPinVerifyRequest struct {
Phone string `json:"phone" xml:"phone" form:"phone"`
Pin string `json:"pin" xml:"pin" form:"pin"`
Configid int `json:"configid"`
Phone string `json:"phone" xml:"phone" form:"phone"`
Pin string `json:"pin" xml:"pin" form:"pin"`
Configid int `json:"configid"`
DeviceToken string `json:"device_token"`
}
type AdminLoginRequest struct {