From 59c137b98b59f04ab90c760f9d8275edeb5395c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 26 Jul 2023 15:16:32 +0800 Subject: [PATCH] 1 --- platformapi/tao_vegetable/order_test.go | 40 ++++++++++--------- .../tiktok_shop/tiktok_api/afs_test.go | 2 +- .../tiktok_shop/tiktok_api/sku_test.go | 3 +- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index 45d10b9f..ae3e3c08 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -21,8 +21,8 @@ func TestName(t *testing.T) { } func TestGetOrderDetail(t *testing.T) { requestParam := &request591.AlibabaAelophyOrderGetRequest{OrderGetRequest: &domain591.AlibabaAelophyOrderGetOrderGetRequest{ - StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(5000902065494700922), + StoreId: utils.String2Pointer("JX102751"), + BizOrderId: utils.Int64ToPointer(5000908068888360754), }} data, err := apiTao.QueryOrderDetail(requestParam) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) @@ -46,12 +46,13 @@ func TestQueryAfsOrderDetail(t *testing.T) { param := &request591.AlibabaWdkOrderRefundGetRequest{ OrderFrom: utils.Int64ToPointer(31), ShopId: nil, - StoreId: utils.String2Pointer("JX668594"), - RefundIds: &[]int64{1314241374}, + StoreId: utils.String2Pointer("JX102751"), + RefundIds: &[]int64{1315405271}, } data, err := apiTao.QueryAfsOrderDetail(param) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false)) + } // 接单 @@ -87,7 +88,7 @@ func TestDeliveryFinishREJECTED(t *testing.T) { } func TestGetTransactionOrderList(t *testing.T) { - queryData := time.Now().AddDate(0, 0, 6) + queryData := time.Now().AddDate(0, 0, 0) create := time.Date(queryData.Year(), queryData.Month(), queryData.Day(), 0, 0, 0, 0, queryData.Location()) end := time.Date(queryData.Year(), queryData.Month(), queryData.Day(), 23, 59, 59, 59, queryData.Location()) createTime := util.LocalTime(create) @@ -96,12 +97,12 @@ func TestGetTransactionOrderList(t *testing.T) { var PageSize int64 = 20 param := &request591.AlibabaWdkOrderListRequest{ BatchQueryRequest: &domain591.AlibabaWdkOrderListBatchQueryRequest{ - StoreIds: &[]string{"JX668594"}, + StoreIds: &[]string{"JX102751"}, StartTime: &createTime, EndTime: &endTime, OrderFrom: utils.Int64ToPointer(ChannelCome), ShopId: nil, - StoreId: utils.String2Pointer("JX668594"), + StoreId: utils.String2Pointer("JX102751"), BizType: nil, }, } @@ -113,20 +114,21 @@ func TestGetTransactionOrderList(t *testing.T) { globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false)) return } + globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) // 取消订单 - for _, v := range *data.Orders { - err := apiTao.DeliveryFinish(&request591.AlibabaAelophyOrderWorkCallbackRequest{ - WorkCallbackRequest: &domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackRequest{ - StoreId: utils.String2Pointer("JX668594"), - BizOrderId: utils.Int64ToPointer(*v.BizOrderId), - Status: utils.String2Pointer("REJECTED"), - }, - }) - if err != nil { - fmt.Println(err) - } - } + //for _, v := range *data.Orders { + // err := apiTao.DeliveryFinish(&request591.AlibabaAelophyOrderWorkCallbackRequest{ + // WorkCallbackRequest: &domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackRequest{ + // StoreId: utils.String2Pointer("JX668594"), + // BizOrderId: utils.Int64ToPointer(*v.BizOrderId), + // Status: utils.String2Pointer("REJECTED"), + // }, + // }) + // if err != nil { + // fmt.Println(err) + // } + //} } func TestPickUp(t *testing.T) { diff --git a/platformapi/tiktok_shop/tiktok_api/afs_test.go b/platformapi/tiktok_shop/tiktok_api/afs_test.go index 86dcd13a..daf688d3 100644 --- a/platformapi/tiktok_shop/tiktok_api/afs_test.go +++ b/platformapi/tiktok_shop/tiktok_api/afs_test.go @@ -18,7 +18,7 @@ import ( // "authority_id": "" //}` -var token = `{"access_token":"ec2e3053-73dc-4e39-87ba-db081bbb55df","expires_in":1689492851,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f7d2e88c-28c6-46bd-b63a-3d3c49ce0c76","authority_id":""}` +var token = `{"access_token":"6045a7f5-622e-4126-b555-46a4da29e80a","expires_in":1690341662,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"6092b5c5-af6e-4481-92e1-545632c58247","authority_id":""}` //var token = `{"access_token":"e3173e9f-266f-4d87-88e7-e7cd837bc9d9","expires_in":1672882632,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"5070aae2-493f-46bd-b5d6-6ea0cd64729f","authority_id":""}` diff --git a/platformapi/tiktok_shop/tiktok_api/sku_test.go b/platformapi/tiktok_shop/tiktok_api/sku_test.go index d748da63..cf99a62d 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_test.go @@ -396,9 +396,10 @@ func TestDeleteSkuAndUploadSkuFengJinBiXu22332(t *testing.T) { for i := 1; i < 100; i++ { result, err := a.GetSkuDetailList(&product_listV2_request.ProductListV2Param{ Status: 0, - CheckStatus: 4, // 1-未提交;2-待审核;3-审核通过;4-审核未通过;5-封禁;7-审核通过待上架 + CheckStatus: 3, // 1-未提交;2-待审核;3-审核通过;4-审核未通过;5-封禁;7-审核通过待上架 Page: int64(i), Size: 100, + StoreId: 81521327, }) if err != nil { globals.SugarLogger.Debugf("=index := %d ,err := %s", i, utils.Format4Output(err, false))