1
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"strings"
|
||||||
"time"
|
"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{}{
|
_, err = a.AccessAPI("order/logistics/change/poi_self", false, map[string]interface{}{
|
||||||
KeyOrderID: orderID,
|
KeyOrderID: orderID,
|
||||||
})
|
})
|
||||||
|
if strings.Contains(err.Error(), "1047") {
|
||||||
|
return a.OrderDelivering(orderID)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package mtwmapi
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -170,3 +171,10 @@ func TestAa2(t *testing.T) {
|
|||||||
"response_type": "token",
|
"response_type": "token",
|
||||||
}), time)
|
}), 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