From a2b440172e8302c10d9458fd026c3e5f4ad33103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 19 Apr 2021 11:33:16 +0800 Subject: [PATCH] aa --- platformapi/jdapi/jdapi_test.go | 6 +++--- platformapi/jdapi/order.go | 2 +- platformapi/jdapi/order_test.go | 5 ++++- platformapi/jdapi/store_page_test.go | 4 ++-- platformapi/jdshopapi/store_page_test.go | 7 +++---- platformapi/mtwmapi/mtwmapi_test.go | 4 ++-- platformapi/mtwmapi/order_test.go | 2 +- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/platformapi/jdapi/jdapi_test.go b/platformapi/jdapi/jdapi_test.go index ed15ac3a..530ef745 100644 --- a/platformapi/jdapi/jdapi_test.go +++ b/platformapi/jdapi/jdapi_test.go @@ -30,9 +30,9 @@ func init() { //prod zs // api = New("6f8d3290-0120-4ad7-8b53-943c67c84f3f", "789279b9ae814ba091ac52815566b54d", "5d668cd227644637bb0fd73ed8118ec8") // const cookieValue = "YYJV3NHVBPHLD36FWP6F3EM5PTXJ2XZQS7U4HWRIDPP4IWGUKUIB4XG5N26CZRDLDF7PKOXBPD6BNTUAJLETLZOIWMCVFI3K6MYZIY4QBIXIMXYDJNUKFGJVQTN5356SAD6WPCIHWNQAG7DDMF7L7S3SHCT3RM3CQG7IJIPUQ3THS5UIUYWMKINM7ETUOQB7OBPOPZVCT3ZJY55243TDVXLO25PP4UYSPTTPMNQ7HPMWOJKJ3BJWGVHD243MXH7NZWW264TKN5UOCJBSSSOKD2QQII" - // const cookieValue = "GXBMZPW62YXDDG4NE5JDLJJJHWWGJFKML56GHPDEUP6E65UMM4MQ2OB3RYHSEGXGEP5RT55TQZ3PJEXQVYJSNEBNZVY76BZPTRJTZTTZEEJRFHJ4JM5NZ6XI3TEG3X54QBIFC4C5WZUMEN6XHATZBIGB4XKWNNCAAVX4SNS5EIQTQBALUVFPM52OJ3X6L4MONINJD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G3X54QBIFC4C5WZUMEN6XHATZBIGB4XKWNNCAAVX4SNS5EIQTQBALUVFPM52OJ3X6L4MONINJDVRVL2UGV6BUPHOMBUWCNPP3AAKAQAXGI3DJA6LUXWO32ILD6E5QHFYGLC6SFRTUQPAUJJXGSGIIZBICUOPVZ7HJW4XPEJFBZU5TAEXOOWKXSK6RWKS6ABQGWC5SHKC73UFVR3WYW3XI5UUIUVWHXTFH6VNYCS4BV5Q") // api.SetCookieWithStr(` // lsp-store1.jddj.com=OPJQMA7B3FTKCAUGO7FHCH5NMBGAWGGXYRNLEHYYZNGNPNIBCAM4IOEPG3NT3RIA44G5C3535Q5LGG4F4SR4AZVLGYKYTKFJJKEAOXENVBL5VXNILRP3GLNVVWA26XZ3VGSYOHA72RICMVZS3G53DTEH3IHCHDRX336R2EXWT7BJ2TYBVH4ZOIDJ3Z4S6CK6YZI2CJPY4ODPTEFER62CESGD6RKRRAYUQASOCANT6CNLQKGUGYTHYOVR7X7HP6VITNSCLX2WLDD26IXJIHPSYUWMUKUGAVD7VFRMEYTOXYHWCYVDXJ6HYFIPWIN3ULLXDDLN2ICON4GRK; store_deviceid=238a1e29ae9f0c2c060e1a68363919ab; jdO2OOpenPortalSessionId=FF99E5136A1AB127C4FF49AEC246DA77.s1; token=3a75e952e9fe48279c96dd8ebcf0fc5a; JSESSIONID=670146147B1EF59F0FCD7BF041BB1C93.s1 diff --git a/platformapi/jdapi/order.go b/platformapi/jdapi/order.go index 90ccd976..bc450e92 100644 --- a/platformapi/jdapi/order.go +++ b/platformapi/jdapi/order.go @@ -318,7 +318,7 @@ type OrderInfo struct { } type OrderQueryParam struct { - PageNo int64 `json:"pageNo,omitempty"` // 当前页数,默认:1 + PageNo int `json:"pageNo,omitempty"` // 当前页数,默认:1 PageSize int `json:"pageSize,omitempty"` // 每页条数,默认:20,最大值100 OrderID int64 `json:"orderId,omitempty"` diff --git a/platformapi/jdapi/order_test.go b/platformapi/jdapi/order_test.go index 2e8bb08b..463a189e 100644 --- a/platformapi/jdapi/order_test.go +++ b/platformapi/jdapi/order_test.go @@ -119,7 +119,10 @@ func TestOrderAddTips(t *testing.T) { func TestOrderQuery2(t *testing.T) { orderList, _, err := api.OrderQuery2(&OrderQueryParam{ - OrderID: 918092290000042, + OrderPurchaseTimeBegin: "2021-04-19 00:00:00", + OrderPurchaseTimeEnd: "2021-04-19 23:59:59", + PageNo: 1, + PageSize: 99999, }) t.Log(utils.Format4Output(orderList, false)) if err != nil { diff --git a/platformapi/jdapi/store_page_test.go b/platformapi/jdapi/store_page_test.go index c3b7f309..cee73eeb 100644 --- a/platformapi/jdapi/store_page_test.go +++ b/platformapi/jdapi/store_page_test.go @@ -30,8 +30,8 @@ func TestGetRealMobileNumber4Order(t *testing.T) { } func TestGetStoreOrderInfo(t *testing.T) { - orderId := "2108505255000362" - orderInfo, err := api.GetStoreOrderInfo(orderId, "12005417") + orderId := "2109303620000162" + orderInfo, err := api.GetStoreOrderInfo(orderId, "11906188") if err != nil { t.Fatal(err) } diff --git a/platformapi/jdshopapi/store_page_test.go b/platformapi/jdshopapi/store_page_test.go index 651c92ed..fdd08a06 100644 --- a/platformapi/jdshopapi/store_page_test.go +++ b/platformapi/jdshopapi/store_page_test.go @@ -8,6 +8,7 @@ import ( "fmt" "math" "sort" + "strings" "testing" "time" @@ -203,10 +204,8 @@ func TestUpdateBasic(t *testing.T) { } func TestUpdateExpand(t *testing.T) { - result := md5.Sum([]byte("12312321321321321")) - resultInt64 := int64(binary.LittleEndian.Uint32(result[8:])) - chanIndex := int(resultInt64 % int64(1000)) - fmt.Println(chanIndex) + str := "https://wx.jxc4.com/jxcsRegist?mobile=15520595380" + fmt.Println(str[:strings.LastIndex(str,"?")]) } func TestCreateGisFence(t *testing.T) { diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index 91a09c31..8f549a51 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 = New("5873", "41c479790a76f86326f89e8048964739", "", "token_tE0txRtx7CRuPIOjh2BH4w") //token_nH_IlcWQKAkZBqklwItNRw diff --git a/platformapi/mtwmapi/order_test.go b/platformapi/mtwmapi/order_test.go index 87401cb3..250c61e7 100644 --- a/platformapi/mtwmapi/order_test.go +++ b/platformapi/mtwmapi/order_test.go @@ -17,7 +17,7 @@ func TestOrderViewStatus(t *testing.T) { } func TestOrderGetOrderDetail(t *testing.T) { - result, err := api.OrderGetOrderDetail(80502051888664167, false) + result, err := api.OrderGetOrderDetail(112028023003605293, false) if err != nil { t.Fatal(err) }