f
This commit is contained in:
@@ -1306,10 +1306,17 @@ func (a *ApiRequestService) ProcessQCXGY7F2Request(params []byte) ([]byte, error
|
||||
|
||||
func (a *ApiRequestService) ProcessQCXG1H7YRequest(params []byte) ([]byte, error) {
|
||||
vin := gjson.GetBytes(params, "vin_code")
|
||||
if !vin.Exists() || vin.String() == "" {
|
||||
return nil, errors.New("api请求, QCXG1H7Y, 缺少 vin_code")
|
||||
plate := gjson.GetBytes(params, "car_license")
|
||||
if !vin.Exists() || vin.String() == "" || !plate.Exists() || plate.String() == "" {
|
||||
return nil, errors.New("api请求, QCXG1H7Y, 缺少 vin_code 或 car_license")
|
||||
}
|
||||
resp, err := a.tianyuanapi.CallInterface("QCXG1H7Y", map[string]interface{}{"vin_code": vin.String()})
|
||||
// 天远侧字段为 vin_code + plate_no,这里将前端 car_license 映射为 plate_no
|
||||
body := map[string]interface{}{
|
||||
"vin_code": vin.String(),
|
||||
"plate_no": plate.String(),
|
||||
}
|
||||
logx.Infof("vehicle api request QCXG1H7Y, vin_code=%s, plate_no=%s", vin.String(), plate.String())
|
||||
resp, err := a.tianyuanapi.CallInterface("QCXG1H7Y", body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user