+ebai.OrderStatusGet
This commit is contained in:
@@ -398,6 +398,16 @@ func (a *API) OrderGet2(orderID string) (order *OrderDetailInfo, err error) {
|
||||
return order, err
|
||||
}
|
||||
|
||||
func (a *API) OrderStatusGet(orderID string) (status int, err error) {
|
||||
result, err := a.AccessAPI("order.status.get", map[string]interface{}{
|
||||
"order_id": orderID,
|
||||
})
|
||||
if err == nil {
|
||||
status = int(utils.ForceInterface2Int64(result.Data.(map[string]interface{})["status"]))
|
||||
}
|
||||
return status, err
|
||||
}
|
||||
|
||||
// 设置订单快递单号
|
||||
func (a *API) OrderExpressCreate(shopID string, expressList []*ExpressInfo) (status int, err error) {
|
||||
result, err := a.AccessAPI("order.express.create", map[string]interface{}{
|
||||
|
||||
@@ -16,7 +16,7 @@ func TestOrderGet(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderGet2(t *testing.T) {
|
||||
result, err := api.OrderGet2("1574550169196474502")
|
||||
result, err := api.OrderGet2("1576493808229489038")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
@@ -24,6 +24,14 @@ func TestOrderGet2(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestOrderStatusGet(t *testing.T) {
|
||||
result, err := api.OrderStatusGet("1576493808229489038")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
}
|
||||
func TestOrderList(t *testing.T) {
|
||||
result, err := api.OrderList("", 0, 0, 0, 0, 0)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user