From 2f092aff59e978077c8ba468ffa370b96f3081b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 4 Jun 2020 17:15:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BF=AB=E9=80=92=E5=8D=95?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdshopapi/store_page.go | 19 +++++++++++++++++++ platformapi/jdshopapi/store_page_test.go | 8 ++++++++ 2 files changed, 27 insertions(+) diff --git a/platformapi/jdshopapi/store_page.go b/platformapi/jdshopapi/store_page.go index bee2aea8..d39cda8f 100644 --- a/platformapi/jdshopapi/store_page.go +++ b/platformapi/jdshopapi/store_page.go @@ -447,3 +447,22 @@ func (a *API) PhoneSensltiveInfo(orderId, accessKey string) (fakeMobile string, } return fakeMobile, err } + +//订单的订单号转移 +//https://porder.shop.jd.com/order/global/updateWaybill +func (a *API) UpdateWaybill(orderId, logiId, logiNo string) (err error) { + var waybiilList = []map[string]interface{}{} + param := map[string]interface{}{ + "logiId": logiId, + "logiNos": []string{logiNo}, + "overseas": false, + "logiNo": logiNo, + } + waybiilList = append(waybiilList, param) + _, err = a.AccessStorePage2("https://porder.shop.jd.com/order/global/updateWaybill", map[string]interface{}{ + "orderId": orderId, + "globalOrder": false, + "waybillList": waybiilList, + }) + return err +} diff --git a/platformapi/jdshopapi/store_page_test.go b/platformapi/jdshopapi/store_page_test.go index 7e3372f0..ba7a3c6b 100644 --- a/platformapi/jdshopapi/store_page_test.go +++ b/platformapi/jdshopapi/store_page_test.go @@ -81,3 +81,11 @@ func TestPhoneSensltiveInfo(t *testing.T) { } t.Log(utils.Format4Output(result, false)) } + +func TestUpdateWaybill(t *testing.T) { + err := api.UpdateWaybill("123076499052", "1274", "88328977356545 ") + if err != nil { + t.Fatal(err) + } + // t.Log(utils.Format4Output(result, false)) +}