From d7d551c7ee14259fa70be4efe0a3fc4ce409d6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Sun, 9 Oct 2022 14:03:05 +0800 Subject: [PATCH] 1 --- .../tiktok_shop/tiktok_api/store_test.go | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/platformapi/tiktok_shop/tiktok_api/store_test.go b/platformapi/tiktok_shop/tiktok_api/store_test.go index b0c50501..56f224e4 100644 --- a/platformapi/tiktok_shop/tiktok_api/store_test.go +++ b/platformapi/tiktok_shop/tiktok_api/store_test.go @@ -2,7 +2,10 @@ package tiktok_api import ( "fmt" + freightTemplate_create_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/freightTemplate_create/request" shop_batchCreateStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_batchCreateStore/request" + "git.rosy.net.cn/baseapi/utils" + "math/rand" "testing" ) @@ -42,3 +45,21 @@ func TestStoreTemp(t *testing.T) { a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token) a.GetStoreBindTemp(63114504) } + +func TestAPI_CreateTradeLimitTemplate(t *testing.T) { + token := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}` + + a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token) + a.FreightTemplateCreate(&freightTemplate_create_request.FreightTemplateCreateParam{ + Template: &freightTemplate_create_request.Template{ + TemplateName: "小时购" + "_" + utils.Int64ToStr(rand.Int63n(19930)) + "_系统模板", + ProductProvince: 51, + ProductCity: 510100, + CalculateType: 2, + TransferType: 1, // 快递 + RuleType: 1, + FixedAmount: 500, + }, + Columns: nil, + }) +}