From d47b048a1e10863231861ea379c342f7153d7ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 9 Apr 2021 14:35:05 +0800 Subject: [PATCH] aa --- platformapi/jdapi/jdapi_test.go | 12 ++++++------ platformapi/jdapi/order_test.go | 4 ++-- platformapi/jdshopapi/callback.go | 20 ++++++++++---------- platformapi/jdshopapi/order.go | 20 +++++++++++--------- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/platformapi/jdapi/jdapi_test.go b/platformapi/jdapi/jdapi_test.go index f98eb8a3..68d1909b 100644 --- a/platformapi/jdapi/jdapi_test.go +++ b/platformapi/jdapi/jdapi_test.go @@ -23,9 +23,9 @@ func init() { // sandbox // api = New("594ab45a-9a73-4a43-82b0-a64cbd55d883", "06692746f7224695ad4788ce340bc854", "d6b42a35a7414a5490d811654d745c84") // prod - // api = New("df045085-c203-465c-87e3-e79279ecf9ed", "425a594759004dcd9b3542e3d7b47ffa", "fb33ef5f67c9423da67e470204dd3af9") + api = New("29afd5a8-f93f-4d4c-9fce-a7297340af59", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4") // 天天果园 - api = New("c45e6510-00ba-4be2-977e-bcb9c9792cc7", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26") + // api = New("c45e6510-00ba-4be2-977e-bcb9c9792cc7", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26") //prod zs // api = New("6f8d3290-0120-4ad7-8b53-943c67c84f3f", "789279b9ae814ba091ac52815566b54d", "5d668cd227644637bb0fd73ed8118ec8") @@ -33,10 +33,10 @@ func init() { // const cookieValue = "YDYCWYUGKSROMV3MKJQIFINJ5CLPYH6IRVFUMFJD3JI6VQKHX3YPHTWDIDBNMCBUKSY3P7SKAHHKR7PHQDSFRXZEWXA4XOUTALIQDGDYIEUCMDPWSYGDVT42DJ27CD27QKCR3UN7KF7EPIHGPR7GCRTBD4JD5OEDGYVLTXZOAVIAMAPC2IHK73SNMGCBBABS2RCYK25KED37XNEIHXBOLMXL3CCURYV3JLSPZ2TKT3IAX2R5RHJHFWI6Q255R73XJZQPN4QJ677RTKLO6JLIL2JXURUFAZSE6C6CNOMI6L2TAK43JJIJQRQAQUQSU537ZFLVPGBYFDJYY" // api.SetJdCookie(cookieValue) // api.SetCookie("user", "VCQUVHVJI4ELNGFZOYMCDYDUSHEJMPXZRZXSNBRB4MVBNENP72REAAZR3R4SGDJ5ZI4FLYLLN5EGBBMTFCWHZVESIWBNLKZPLHWD6UIBTPXOF5IXM6AVA3V6TUNZD5UJS43AROJ2IRPZWEN5AGZYBUEGD3MSKKBKBSRP3DSEQXLITYNBLFZCHXCA7L4KGOSJRMM7R5IQP7QGLGRQB27AOE4YMLRJ3UPTZADPWJOYB3UZ7UZHLBVZRREEX647O3WQUU4BYXUOFZPIPRR77W3PQV543E") - api.SetCookieWithStr(` - lsp-store1.jddj.com=OPJQMA7B3FTKCAUGO7FHCH5NMBGAWGGXYRNLEHYYZNGNPNIBCAM4IOEPG3NT3RIA44G5C3535Q5LGG4F4SR4AZVLGYKYTKFJJKEAOXENVBL5VXNILRP3GLNVVWA26XZ3VGSYOHA72RICMVZS3G53DTEH3IHCHDRX336R2EXWT7BJ2TYBVH4ZOIDJ3Z4S6CK6YZI2CJPY4ODPTEFER62CESGD6RKRRAYUQASOCANT6CNLQKGUGYTHYOVR7X7HP6VITNSCLX2WLDD26IXJIHPSYUWMUKUGAVD7VFRMEYTOXYHWCYVDXJ6HYFIPWIN3ULLXDDLN2ICON4GRK; store_deviceid=238a1e29ae9f0c2c060e1a68363919ab; jdO2OOpenPortalSessionId=FF99E5136A1AB127C4FF49AEC246DA77.s1; token=3a75e952e9fe48279c96dd8ebcf0fc5a; JSESSIONID=670146147B1EF59F0FCD7BF041BB1C93.s1 - - `) + // api.SetCookieWithStr(` + // lsp-store1.jddj.com=OPJQMA7B3FTKCAUGO7FHCH5NMBGAWGGXYRNLEHYYZNGNPNIBCAM4IOEPG3NT3RIA44G5C3535Q5LGG4F4SR4AZVLGYKYTKFJJKEAOXENVBL5VXNILRP3GLNVVWA26XZ3VGSYOHA72RICMVZS3G53DTEH3IHCHDRX336R2EXWT7BJ2TYBVH4ZOIDJ3Z4S6CK6YZI2CJPY4ODPTEFER62CESGD6RKRRAYUQASOCANT6CNLQKGUGYTHYOVR7X7HP6VITNSCLX2WLDD26IXJIHPSYUWMUKUGAVD7VFRMEYTOXYHWCYVDXJ6HYFIPWIN3ULLXDDLN2ICON4GRK; store_deviceid=238a1e29ae9f0c2c060e1a68363919ab; jdO2OOpenPortalSessionId=FF99E5136A1AB127C4FF49AEC246DA77.s1; token=3a75e952e9fe48279c96dd8ebcf0fc5a; JSESSIONID=670146147B1EF59F0FCD7BF041BB1C93.s1 + + // `) } func TestTest(t *testing.T) { diff --git a/platformapi/jdapi/order_test.go b/platformapi/jdapi/order_test.go index 9f03a12e..2e8bb08b 100644 --- a/platformapi/jdapi/order_test.go +++ b/platformapi/jdapi/order_test.go @@ -128,7 +128,7 @@ func TestOrderQuery2(t *testing.T) { } func TestGetByOrderNoForOaos(t *testing.T) { - orderList, err := api.GetByOrderNoForOaos("2027170805000062") + orderList, err := api.GetByOrderNoForOaos("2108504597000531") t.Log(utils.Format4Output(orderList, false)) if err != nil { t.Fatal(err.Error()) @@ -136,7 +136,7 @@ func TestGetByOrderNoForOaos(t *testing.T) { } func TestGetByOrderNoForOaosNew(t *testing.T) { - orderList, err := api.GetByOrderNoForOaosNew("2027170805000062") + orderList, err := api.GetByOrderNoForOaosNew("2108504597000531") t.Log(utils.Format4Output(orderList, false)) if err != nil { t.Fatal(err.Error()) diff --git a/platformapi/jdshopapi/callback.go b/platformapi/jdshopapi/callback.go index 6311a75a..8909e47f 100644 --- a/platformapi/jdshopapi/callback.go +++ b/platformapi/jdshopapi/callback.go @@ -9,16 +9,16 @@ import ( ) type CallBackResult struct { - OrderStateRemark string `json:"orderStateRemark"` - OrderRemark string `json:"orderRemark"` - OrderSellerPrice string `json:"orderSellerPrice"` - OrderState string `json:"orderState"` - OrderType string `json:"orderType"` - OrderPayment string `json:"orderPayment"` - PayType string `json:"payType"` - StoreID string `json:"storeId"` - OrderTotalPrice string `json:"orderTotalPrice"` - // OrderExt *OrderExt `json:"orderExt"` + OrderStateRemark string `json:"orderStateRemark"` + OrderRemark string `json:"orderRemark"` + OrderSellerPrice string `json:"orderSellerPrice"` + OrderState string `json:"orderState"` + OrderType string `json:"orderType"` + OrderPayment string `json:"orderPayment"` + PayType string `json:"payType"` + StoreID string `json:"storeId"` + OrderTotalPrice string `json:"orderTotalPrice"` + OrderExt string `json:"orderExt"` StoreOrder string `json:"storeOrder"` OrderStartTime string `json:"orderStartTime"` OrderID string `json:"orderId"` diff --git a/platformapi/jdshopapi/order.go b/platformapi/jdshopapi/order.go index 1034cce7..cc6b15a5 100644 --- a/platformapi/jdshopapi/order.go +++ b/platformapi/jdshopapi/order.go @@ -88,9 +88,9 @@ type GetOrderResult struct { WareID string `json:"wareId"` GiftPoint string `json:"giftPoint"` } `json:"itemInfoList"` - StoreID string `json:"storeId"` - OrderTotalPrice string `json:"orderTotalPrice"` - // OrderExt *OrderExt `json:"orderExt"` + StoreID string `json:"storeId"` + OrderTotalPrice string `json:"orderTotalPrice"` + OrderExt string `json:"orderExt"` StoreOrder string `json:"storeOrder"` OrderStartTime string `json:"orderStartTime"` OrderID string `json:"orderId"` @@ -105,11 +105,13 @@ type GetOrderResult struct { } type OrderExt struct { - O2ODeliveryTime string `json:"o2oDeliveryTime"` - // AerfaTimeIDSopShipmentType string `json:"aerfaTime.idSopShipmentType"` - StoreName string `json:"storeName"` - Road string `json:"road"` - Contact string `json:"contact"` + AerfaTimeIDSopShipmentType string `json:"aerfaTime.idSopShipmentType"` + PromiseMsg string `json:"promiseMsg"` + Road string `json:"road"` + Contact string `json:"contact"` + O2ODeliveryTime string `json:"o2oDeliveryTime"` + SiteID string `json:"siteId"` + StoreName string `json:"storeName"` } //查询单个订单 @@ -120,7 +122,7 @@ func (a *API) GetOrder(orderID int64, isStatus bool) (getOrderResult *GetOrderRe params["optional_fields"] = `orderType,payType,orderTotalPrice,orderSellerPrice, orderPayment,freightPrice,orderState,orderStateRemark, orderStartTime,orderEndTime,orderRemark,consigneeInfo, - itemInfoList,pauseBizInfo,pin,idSopShipmenttype,scDT,sellerDiscount,menDianId,storeId,balanceUsed` + itemInfoList,pauseBizInfo,pin,idSopShipmenttype,scDT,sellerDiscount,menDianId,storeId,balanceUsed,orderExt` if isStatus { params["order_state"] = "WAIT_SELLER_STOCK_OUT,TRADE_CANCELED,PAUSE,WAIT_GOODS_RECEIVE_CONFIRM,FINISHED_L" }