京东商城订单result
This commit is contained in:
@@ -44,9 +44,6 @@ func (a *API) GetDeliveryCompany() (result interface{}, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetOrderResult struct {
|
type GetOrderResult struct {
|
||||||
JingdongPopOrderGetResponce struct {
|
|
||||||
Code string `json:"code"`
|
|
||||||
OrderDetailInfo struct {
|
|
||||||
OrderInfo struct {
|
OrderInfo struct {
|
||||||
OrderStateRemark string `json:"orderStateRemark"`
|
OrderStateRemark string `json:"orderStateRemark"`
|
||||||
OrderRemark string `json:"orderRemark"`
|
OrderRemark string `json:"orderRemark"`
|
||||||
@@ -97,14 +94,12 @@ type GetOrderResult struct {
|
|||||||
ChineseErrCode string `json:"chineseErrCode"`
|
ChineseErrCode string `json:"chineseErrCode"`
|
||||||
NumberCode int `json:"numberCode"`
|
NumberCode int `json:"numberCode"`
|
||||||
} `json:"apiResult"`
|
} `json:"apiResult"`
|
||||||
} `json:"orderDetailInfo"`
|
|
||||||
} `json:"jingdong_pop_order_get_responce"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询单个订单
|
//查询单个订单
|
||||||
//https://open.jd.com/home/home#/doc/api?apiCateId=55&apiId=4247&apiName=jingdong.pop.order.get
|
//https://open.jd.com/home/home#/doc/api?apiCateId=55&apiId=4247&apiName=jingdong.pop.order.get
|
||||||
func (a *API) GetOrder(orderID int64) (err error) {
|
func (a *API) GetOrder(orderID int64) (getOrderResult *GetOrderResult, err error) {
|
||||||
_, err = a.AccessAPI("jingdong.pop.order.get", prodURL, map[string]interface{}{
|
result, err := a.AccessAPI("jingdong.pop.order.get", prodURL, map[string]interface{}{
|
||||||
"order_id": orderID,
|
"order_id": orderID,
|
||||||
"optional_fields": `orderType,payType,orderTotalPrice,orderSellerPrice,
|
"optional_fields": `orderType,payType,orderTotalPrice,orderSellerPrice,
|
||||||
orderPayment,freightPrice,orderState,orderStateRemark,
|
orderPayment,freightPrice,orderState,orderStateRemark,
|
||||||
@@ -112,7 +107,10 @@ func (a *API) GetOrder(orderID int64) (err error) {
|
|||||||
itemInfoList,pauseBizInfo`,
|
itemInfoList,pauseBizInfo`,
|
||||||
"order_state": "WAIT_SELLER_STOCK_OUT,PAUSE",
|
"order_state": "WAIT_SELLER_STOCK_OUT,PAUSE",
|
||||||
})
|
})
|
||||||
return err
|
if err == nil {
|
||||||
|
utils.Map2StructByJson(result["jingdong_pop_order_get_responce"].(map[string]interface{})["orderDetailInfo"].(map[string]interface{})["orderInfo"], &getOrderResult, false)
|
||||||
|
}
|
||||||
|
return getOrderResult, err
|
||||||
}
|
}
|
||||||
|
|
||||||
type VoucherInfoGetResult struct {
|
type VoucherInfoGetResult struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user