京东商城订单数据
This commit is contained in:
@@ -37,12 +37,19 @@ func (a *API) GetDeliveryCompany() (result interface{}, err error) {
|
||||
return result, err
|
||||
}
|
||||
|
||||
type GetOrderResult struct {
|
||||
}
|
||||
|
||||
//查询单个订单
|
||||
//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) {
|
||||
_, err = a.AccessAPI("jingdong.pop.order.get", prodURL, map[string]interface{}{
|
||||
"order_id": orderID,
|
||||
"optional_fields": "orderType,payType,orderTotalPrice,orderSellerPrice,orderPayment,freightPrice",
|
||||
"order_id": orderID,
|
||||
"optional_fields": `orderType,payType,orderTotalPrice,orderSellerPrice,
|
||||
orderPayment,freightPrice,orderState,orderStateRemark,
|
||||
orderStartTime,orderEndTime,orderRemark,consigneeInfo,
|
||||
itemInfoList,pauseBizInfo`,
|
||||
"order_state": "WAIT_SELLER_STOCK_OUT,PAUSE",
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func TestGetProvince(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetCity(t *testing.T) {
|
||||
result, err := api.GetCity(5)
|
||||
result, err := api.GetCity(2)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -56,7 +56,7 @@ func TestGetCity(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetCounty(t *testing.T) {
|
||||
result, err := api.GetCounty(199)
|
||||
result, err := api.GetCounty(2834)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user