diff --git a/platformapi/jdeclpapi/jdeclpapi.go b/platformapi/jdeclpapi/jdeclpapi.go index 01b46591..fb1466d2 100644 --- a/platformapi/jdeclpapi/jdeclpapi.go +++ b/platformapi/jdeclpapi/jdeclpapi.go @@ -428,3 +428,12 @@ func (a *API) CancelWayBill(cancelWayBillParam *CancelWayBillParam) (err error) _, err = a.AccessAPI("jingdong.ldop.delivery.provider.cancelWayBill", prodURL, utils.Struct2FlatMap(cancelWayBillParam)) return err } + +//京东物流全程跟踪接口 +//https://open.jd.com/home/home#/doc/api?apiCateId=64&apiId=4257&apiName=jingdong.trace.dynamicQueryService.queryDynamicTraceInfo +func (a *API) QueryDynamicTraceInfo(waybillCode string) (err error) { + _, err = a.AccessAPI("jingdong.trace.dynamicQueryService.queryDynamicTraceInfo", prodURL, map[string]interface{}{ + "waybillCode": waybillCode, + }) + return err +} diff --git a/platformapi/jdshopapi/store_test.go b/platformapi/jdshopapi/store_test.go index 0167a1f2..c198aed3 100644 --- a/platformapi/jdshopapi/store_test.go +++ b/platformapi/jdshopapi/store_test.go @@ -3,8 +3,9 @@ package jdshopapi import ( "encoding/base64" "fmt" - "strings" + "math/rand" "testing" + "time" "git.rosy.net.cn/baseapi/utils" ) @@ -97,6 +98,5 @@ func TestFindStoreInfoByExtStoreId(t *testing.T) { } func TestWIREHL(t *testing.T) { - str := "https://51106.cn/c/22f06354336ca9" - fmt.Println(str[strings.LastIndex(str, "/")+1 : len(str)]) + fmt.Println(fmt.Sprintf("%06v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(1000000))) } diff --git a/platformapi/yilianyunapi/yilianyunapi_test.go b/platformapi/yilianyunapi/yilianyunapi_test.go index 4e14246e..ea5ce4e9 100644 --- a/platformapi/yilianyunapi/yilianyunapi_test.go +++ b/platformapi/yilianyunapi/yilianyunapi_test.go @@ -65,13 +65,13 @@ func TestPrintMsgWithToken(t *testing.T) { } func TestGetPrintStatus(t *testing.T) { - state, err := api.GetPrintStatus("4004653390") + state, err := api.GetPrintStatus("4004627655") handleError(t, err) baseapi.SugarLogger.Debug(state) } func TestGetPrintStatusWithToken(t *testing.T) { - state, err := api.GetPrintStatusWithToken("4004653390", "07e5895c70114395a285ae20119d83b1") + state, err := api.GetPrintStatusWithToken("4004627655", "308344d0cb74469eb892b26eaffffca2") handleError(t, err) baseapi.SugarLogger.Debug(state) }