结构修改
This commit is contained in:
parent
d71b922862
commit
98035bee13
|
@ -107,14 +107,14 @@ func (w *ZltxOrderDetailTool) getZltxOrderDetail(requireData *entitys.RequireDat
|
|||
res, err := req.Send()
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("订单查询失败:%s", err.Error())
|
||||
return fmt.Errorf("订单查询失败:网络请求错误:%s", err.Error())
|
||||
}
|
||||
var codeMap map[string]interface{}
|
||||
if err = json.Unmarshal(res.Content, &codeMap); err != nil {
|
||||
return
|
||||
}
|
||||
if codeMap["code"].(float64) != 200 {
|
||||
return fmt.Errorf("订单查询失败:%s", codeMap["error"])
|
||||
return fmt.Errorf("订单查询失败:状态码错误:%s", codeMap["error"])
|
||||
}
|
||||
|
||||
var resData ZltxOrderDetailResponse
|
||||
|
|
|
@ -95,7 +95,7 @@ func (t *ZltxOrderLogTool) getZltxOrderLog(orderNumber, serialNumber string, req
|
|||
return
|
||||
}
|
||||
if resData.Code != 200 {
|
||||
return fmt.Errorf("订单查询失败:%s", resData.Error)
|
||||
return fmt.Errorf("订单查询失败:日志查询失败:%s", resData.Error)
|
||||
}
|
||||
if err = json.Unmarshal(res.Content, &resData); err != nil {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue