fix 车辆维保记录
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user