diff --git a/platformapi/jdapi/jdapi_test.go b/platformapi/jdapi/jdapi_test.go index 00553a30..e1bba5f0 100644 --- a/platformapi/jdapi/jdapi_test.go +++ b/platformapi/jdapi/jdapi_test.go @@ -23,12 +23,12 @@ func init() { // sandbox // api = New("594ab45a-9a73-4a43-82b0-a64cbd55d883", "06692746f7224695ad4788ce340bc854", "d6b42a35a7414a5490d811654d745c84") // prod - // api = New("29afd5a8-f93f-4d4c-9fce-a7297340af59", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4") + api = New("29afd5a8-f93f-4d4c-9fce-a7297340af59", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4") // 天天果园 // api = New("c45e6510-00ba-4be2-977e-bcb9c9792cc7", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26") //prod zs - api = New("6f8d3290-0120-4ad7-8b53-943c67c84f3f", "789279b9ae814ba091ac52815566b54d", "5d668cd227644637bb0fd73ed8118ec8") + // api = New("6f8d3290-0120-4ad7-8b53-943c67c84f3f", "789279b9ae814ba091ac52815566b54d", "5d668cd227644637bb0fd73ed8118ec8") // const cookieValue = "YYJV3NHVBPHLD36FWP6F3EM5PTXJ2XZQS7U4HWRIDPP4IWGUKUIB4XG5N26CZRDLDF7PKOXBPD6BNTUAJLETLZOIWMCVFI3K6MYZIY4QBIXIMXYDJNUKFGJVQTN5356SAD6WPCIHWNQAG7DDMF7L7S3SHCT3RM3CQG7IJIPUQ3THS5UIUYWMKINM7ETUOQB7OBPOPZVCT3ZJY55243TDVXLO25PP4UYSPTTPMNQ7HPMWOJKJ3BJWGVHD243MXH7NZWW264TKN5UOCJBSSSOKD2QQII" const cookieValue = "OPJQMA7B3FTKCAUGO7FHCH5NMBGAWGGXYRNLEHYYZNGNPNIBCAM4IOEPG3NT3RIA44G5C3535Q5LGG4F4SR4AZVLGYKYTKFJJKEAOXENVBL5VXNILRP3GLNVVWA26XZ3VGSYOHA72RICMVZS3G53DTEH3J7VMEGG2RGQEK6VMGIWEIL3X66ZYUZZOKKUUBKAWCWZPLF745R6MSYFJJ6EXUPLU4UGKXFQWEBUCQAMIOV7EVR4JGDPUMIPCVZVKBP5XQU32N7XTB6LGOP5RZQCH7DRHM" api.SetJdCookie(cookieValue) diff --git a/platformapi/jdapi/order_test.go b/platformapi/jdapi/order_test.go index 042b0d8c..6382102f 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("921235438000341") + orderList, err := api.GetByOrderNoForOaos("2027170805000062") 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("921235438000341") + orderList, err := api.GetByOrderNoForOaosNew("2027170805000062") t.Log(utils.Format4Output(orderList, false)) if err != nil { t.Fatal(err.Error()) @@ -144,7 +144,7 @@ func TestGetByOrderNoForOaosNew(t *testing.T) { } func TestCheckSelfPickCode(t *testing.T) { - err := api.CheckSelfPickCode("020606", "921235438000341", "test") + err := api.CheckSelfPickCode("135246", "2027170805000062", "jxadmin") if err != nil { t.Fatal(err.Error()) } diff --git a/platformapi/jdeclpapi/jdeclpapi.go b/platformapi/jdeclpapi/jdeclpapi.go index f2364334..1629c04b 100644 --- a/platformapi/jdeclpapi/jdeclpapi.go +++ b/platformapi/jdeclpapi/jdeclpapi.go @@ -45,6 +45,19 @@ const ( SoStatusCode10033 = "10033" //站点验收 SoStatusCode10034 = "10034" //妥投 SoStatusCode10038 = "10038" //逆向完成 + + TraceInfoStateM625 = "-625" //揽收任务分配 + TraceInfoStateM190 = "-190" //上门接货 + TraceInfoStateM640 = "-640" //配送员完成揽收 + TraceInfoStateM170 = "-170" //分拣中心收货 + TraceInfoState200 = "200" //站点装箱发货 + TraceInfoState10 = "10" //分拣中心验货 + TraceInfoState13 = "13" //分拣中心分拣 + TraceInfoState16 = "16" //分拣中心发货 + TraceInfoState60 = "60" //站点收货 + TraceInfoState80 = "80" //站点验货 + TraceInfoState110 = "110" //配送员收货 + TraceInfoState150 = "150" //妥投 ) type API struct { diff --git a/platformapi/jdeclpapi/jdeclpapi_test.go b/platformapi/jdeclpapi/jdeclpapi_test.go index b03d4070..c4b2d2d5 100644 --- a/platformapi/jdeclpapi/jdeclpapi_test.go +++ b/platformapi/jdeclpapi/jdeclpapi_test.go @@ -127,7 +127,7 @@ func TestCancelWayBill(t *testing.T) { } func TestQueryDynamicTraceInfo(t *testing.T) { - result, err := api.QueryDynamicTraceInfo("JDVD01096487452") + result, err := api.QueryDynamicTraceInfo("JDVD01119013942") if err != nil { t.Fatal(err) } @@ -135,7 +135,7 @@ func TestQueryDynamicTraceInfo(t *testing.T) { } func TestWaybillQuery(t *testing.T) { - result, err := api.WaybillQuery("JDVD01096487452") + result, err := api.WaybillQuery("JDVD01119013942") if err != nil { t.Fatal(err) } diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index 15d69ea8..cc60c963 100644 --- a/platformapi/mtwmapi/mtwmapi_test.go +++ b/platformapi/mtwmapi/mtwmapi_test.go @@ -19,10 +19,10 @@ func init() { baseapi.Init(sugarLogger) // 菜市 - api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "") + // api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "") // 果园 - // api = New("4123", "df2c88338b85f830cebce2a9eab56628", "") + api = New("4123", "df2c88338b85f830cebce2a9eab56628", "") // api.SetCookie("_lx_utm", "utm_source%3D60066") // api.SetCookie("_lxsdk", "82B825F99C7098EE5254EB228DC2A863CE34008DFF4AD0913E8DC80D009AA95E") @@ -49,7 +49,7 @@ func init() { // api.SetCookie("w_latlng", "30702250,104052315") cookieStr := ` - _lxsdk_cuid=172a6a9e89ec8-0876fd0b210a31-4e714511-15f900-172a6a9e89fc8; _lxsdk=172a6a9e89ec8-0876fd0b210a31-4e714511-15f900-172a6a9e89fc8; uuid_update=true; uuid=5b4e9f8306750ebf8e90.1591946010.1.0.0; device_uuid=!70f39cee-3c20-44c6-abe9-a8fa18a21c76; pushToken=0Sb28aO1nitSaWX-84LbCTjl7bicdYDWnpH40cGbBUs4*; wpush_server_url=wss://wpush.meituan.com; acctId=57396785; token=0fBG5UnxFzlome3nu69bmHcCMx-DGLJLhPhJHOlO9ruI*; brandId=-1; wmPoiId=-1; isOfflineSelfOpen=0; city_id=0; isChain=1; existBrandPoi=true; ignore_set_router_proxy=true; region_id=; region_version=0; newCategory=true; bsid=NBAQe-PcrcnMcSj4-6j85fnmomQBL_uiEvSZNlmjiaGPY4Hhn4FH22x_KvWicqy_wMz23p8JE5kgdxrsKwSqxw; cityId=510100; provinceId=510000; city_location_id=0; location_id=0; shopCategory=food; set_info=%7B%22wmPoiId%22%3A-1%2C%22ignoreSetRouterProxy%22%3Atrue%7D; igateApp=shangouepc; pharmacistAccount=0; JSESSIONID=gqmw35bsdy3hw3otz7yu2d9k; _lxsdk_s=174062b4c68-df9-15f-cd9%7C%7C30 + acctId=62884810; token=0_0_vJux6rcmm0XIzoI885_aew-gnfofUw9SR-a-QkLw*; brandId=-1; wmPoiId=-1; ` api.SetCookieWithStr(cookieStr) } diff --git a/platformapi/mtwmapi/order_test.go b/platformapi/mtwmapi/order_test.go index 677d8d79..d74d3c90 100644 --- a/platformapi/mtwmapi/order_test.go +++ b/platformapi/mtwmapi/order_test.go @@ -16,7 +16,7 @@ func TestOrderViewStatus(t *testing.T) { } func TestOrderGetOrderDetail(t *testing.T) { - result, err := api.OrderGetOrderDetail(24617130273189791, false) + result, err := api.OrderGetOrderDetail(93475541926981203, false) if err != nil { t.Fatal(err) } @@ -27,7 +27,7 @@ func TestOrderGetOrderDetail(t *testing.T) { } func TestOrderGetOrderDetail2(t *testing.T) { - result, err := api.OrderGetOrderDetail2(24617130273189791, false) + result, err := api.OrderGetOrderDetail2(93475541926981203, false) if err != nil { t.Fatal(err) } @@ -35,7 +35,7 @@ func TestOrderGetOrderDetail2(t *testing.T) { } func TestOrderGetPartRefundFoods(t *testing.T) { - result, err := api.OrderGetPartRefundFoods(25236870562694625) + result, err := api.OrderGetPartRefundFoods(93475541926981203) if err != nil { t.Fatal(err) } @@ -57,7 +57,7 @@ func TestOrderConfirm(t *testing.T) { } func TestOrderApplyPartRefund(t *testing.T) { - err := api.OrderApplyPartRefund(25236872740350976, "缺货", []*RefundSku{ + err := api.OrderApplyPartRefund(93495654059392270, "缺货", []*RefundSku{ &RefundSku{ AppFoodCode: "30831", Count: 1, diff --git a/platformapi/mtwmapi/user_page.go b/platformapi/mtwmapi/user_page.go index 0de5c6f1..50e9663a 100644 --- a/platformapi/mtwmapi/user_page.go +++ b/platformapi/mtwmapi/user_page.go @@ -40,10 +40,11 @@ type ListShopItem struct { var ( actionHostMap = map[string]string{ - "v2/order/receive/processed/w/distribute/tipAmount/v2": orderURL, - "v2/order/receive/processed/r/distribute/list/v2": orderURL, - "reuse/sc/product/packageprice/w/update": orderURL, - "reuse/sc/product/packageprice/r/get": orderURL, + "v2/order/receive/processed/w/distribute/tipAmount/v2": orderURL, + "v2/order/receive/processed/r/distribute/list/v2": orderURL, + "reuse/sc/product/packageprice/w/update": orderURL, + "reuse/sc/product/packageprice/r/get": orderURL, + "reuse/sc/product/retail/r/getStandardProductListWithCond": orderURL, } ) @@ -140,3 +141,14 @@ func (a *API) GetStoreInfo(storeID string) (storeInfo map[string]interface{}, er retVal, err := a.AccessUserPage("openh5/poi/info", params) return retVal, err } + +//https://shangoue.meituan.com/reuse/sc/product/retail/r/getStandardProductListWithCond +func (a *API) GetStandardProductListWithCond(upc string) (err error) { + params := map[string]interface{}{ + "keyword": upc, + "pageNo": 1, + "pageSize": 20, + } + _, err = a.AccessUserPage("reuse/sc/product/retail/r/getStandardProductListWithCond", params) + return err +} diff --git a/platformapi/mtwmapi/user_page_test.go b/platformapi/mtwmapi/user_page_test.go index bcf6cd57..eeb56aa1 100644 --- a/platformapi/mtwmapi/user_page_test.go +++ b/platformapi/mtwmapi/user_page_test.go @@ -41,3 +41,11 @@ func TestGetStoreInfo(t *testing.T) { } t.Log(utils.Format4Output(result, false)) } + +func TestGetStandardProductListWithCond(t *testing.T) { + err := api.GetStandardProductListWithCond("6925436710085") + if err != nil { + t.Fatal(err) + } + // t.Log(utils.Format4Output(result, false)) +} diff --git a/platformapi/weixinapi/sns_test.go b/platformapi/weixinapi/sns_test.go index 21c2eed2..3ed0bdc6 100644 --- a/platformapi/weixinapi/sns_test.go +++ b/platformapi/weixinapi/sns_test.go @@ -3,7 +3,7 @@ package weixinapi import "testing" func TestSNSRetrieveToken(t *testing.T) { - result, err := api.SNSRetrieveToken("061lxVZh0gye0x1fNrZh0imd0i0lxVZS") + result, err := api.SNSRetrieveToken("013vRK0006IzAK1xRM100WPcXB1vRK0k") if err != nil { t.Fatal(err.Error()) } @@ -29,3 +29,11 @@ func TestSNSDecodeMiniProgramData(t *testing.T) { sugarLogger.Debug(string(result)) sugarLogger.Debug(len(result)) } + +func TestSNSGetUserInfo(t *testing.T) { + result, err := api.SNSGetUserInfo("38_l84lcm8hNHIByEaC2JZkBz4F1Lu6xWkADYMVUQ3e3psrTaWS7cz8EgZpvAn5xUwLTLZZZez4oCkVQ9RW0C8BFscWKJhMSnQq0bG287iEUyQ", "oRrdQt6IBtfUSN1oG7Cls4wl7gkk") + if err != nil { + t.Fatal(err.Error()) + } + sugarLogger.Debug(result) +}