This commit is contained in:
2026-02-12 16:25:01 +08:00
parent ce34e426c4
commit 2b8add736f
3 changed files with 44 additions and 5 deletions

View File

@@ -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
}