1
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -595,6 +596,9 @@ func (a *API) OrderLogisticsChange2Self(orderID int64) (err error) {
|
||||
_, err = a.AccessAPI("order/logistics/change/poi_self", false, map[string]interface{}{
|
||||
KeyOrderID: orderID,
|
||||
})
|
||||
if strings.Contains(err.Error(), "1047") {
|
||||
return a.OrderDelivering(orderID)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package mtwmapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -170,3 +171,10 @@ func TestAa2(t *testing.T) {
|
||||
"response_type": "token",
|
||||
}), time)
|
||||
}
|
||||
|
||||
func TestDeleving(t *testing.T) {
|
||||
err := api.OrderLogisticsChange2Self(148815412830472574)
|
||||
|
||||
fmt.Println(strings.Contains(err.Error(), "1047"))
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user