增添jd的订单拆分接口
This commit is contained in:
@@ -144,6 +144,7 @@ func (a *API) AccessAPI(apiStr string, jdParams map[string]interface{}) (retVal
|
|||||||
sign := a.signParams(params)
|
sign := a.signParams(params)
|
||||||
params[signKey] = sign
|
params[signKey] = sign
|
||||||
request, _ := http.NewRequest(http.MethodGet, utils.GenerateGetURL(prodURL, apiStr, params), nil)
|
request, _ := http.NewRequest(http.MethodGet, utils.GenerateGetURL(prodURL, apiStr, params), nil)
|
||||||
|
request.Close = true //todo 为了避免EOF错误
|
||||||
err = platformapi.AccessPlatformAPIWithRetry(a.client, request, a.config, func(response *http.Response) (errLevel string, err error) {
|
err = platformapi.AccessPlatformAPIWithRetry(a.client, request, a.config, func(response *http.Response) (errLevel string, err error) {
|
||||||
jsonResult1, err := utils.HTTPResponse2Json(response)
|
jsonResult1, err := utils.HTTPResponse2Json(response)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -138,3 +138,15 @@ func (a API) DeliveryEndOrder(orderId string) (interface{}, error) {
|
|||||||
}
|
}
|
||||||
return a.AccessAPINoPage("ocs/deliveryEndOrder", jdParams, nil, nil)
|
return a.AccessAPINoPage("ocs/deliveryEndOrder", jdParams, nil, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//订单金额拆分接口
|
||||||
|
func (a API) QueryOassBussMoney(orderId string) ([]interface{}, error) {
|
||||||
|
jdParams := map[string]interface{}{
|
||||||
|
"orderId": orderId,
|
||||||
|
}
|
||||||
|
result, err := a.AccessAPINoPage("oassBussService/queryOassBussMoney", jdParams, nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result.([]interface{}), nil
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user