fix 车辆维保记录

This commit is contained in:
2025-03-21 15:47:11 +08:00
parent 02a382f911
commit c702894f64
14 changed files with 664 additions and 143 deletions

View File

@@ -98,16 +98,16 @@ func (y *YushanService) request(prodID string, params map[string]interface{}) ([
if retCode == "100000" {
// retcode 为 100000表示查询为空
return nil, fmt.Errorf("羽山请求查空: %s", string(respData))
return respData, fmt.Errorf("羽山请求查空: %s", string(respData))
} else if retCode == "000000" || retCode == "000001" || retCode == "000002" || retCode == "000003" {
// retcode 为 000000表示有数据返回 retdata
retData := gjson.GetBytes(respData, "retdata")
if !retData.Exists() {
return nil, fmt.Errorf("羽山请求retdata为空: %s", string(respData))
return respData, fmt.Errorf("羽山请求retdata为空: %s", string(respData))
}
return []byte(retData.Raw), nil
} else {
return nil, fmt.Errorf("羽山请求未知的状态码: %s", string(respData))
return respData, fmt.Errorf("羽山请求未知的状态码: %s", string(respData))
}
}