f
This commit is contained in:
@@ -131,7 +131,8 @@ type QCXGA8V3Req struct {
|
|||||||
VinCode string `json:"vin_code" validate:"required"`
|
VinCode string `json:"vin_code" validate:"required"`
|
||||||
}
|
}
|
||||||
type QCXG8N4RReq struct {
|
type QCXG8N4RReq struct {
|
||||||
PlateNo string `json:"plate_no" validate:"required"`
|
PlateNo string `json:"plate_no" validate:"omitempty"`
|
||||||
|
VinCode string `json:"vin_code" validate:"omitempty"`
|
||||||
}
|
}
|
||||||
type QCXGH3R8Req struct {
|
type QCXGH3R8Req struct {
|
||||||
VinCode string `json:"vin_code" validate:"required"`
|
VinCode string `json:"vin_code" validate:"required"`
|
||||||
|
|||||||
@@ -22,9 +22,17 @@ func ProcessQCXG8N4RRequest(ctx context.Context, params []byte, deps *processors
|
|||||||
return nil, errors.Join(processors.ErrInvalidParam, err)
|
return nil, errors.Join(processors.ErrInvalidParam, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
carNo := paramsDto.VinCode
|
||||||
|
if carNo == "" {
|
||||||
|
carNo = paramsDto.PlateNo
|
||||||
|
}
|
||||||
|
if carNo == "" {
|
||||||
|
return nil, errors.Join(processors.ErrInvalidParam, errors.New("plate_no、vin_code 至少需要传其中一个"))
|
||||||
|
}
|
||||||
|
|
||||||
reqParams := map[string]interface{}{
|
reqParams := map[string]interface{}{
|
||||||
"key": "5d253801dbde7ccd75639449b6c91fe2",
|
"key": "5d253801dbde7ccd75639449b6c91fe2",
|
||||||
"carNo": paramsDto.PlateNo,
|
"carNo": carNo,
|
||||||
}
|
}
|
||||||
|
|
||||||
apiPath := "/communication/personal/10186"
|
apiPath := "/communication/personal/10186"
|
||||||
|
|||||||
Reference in New Issue
Block a user