From 625a3a3457e470fe5928cf667d6b45125d231385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 28 Apr 2025 11:36:37 +0800 Subject: [PATCH] 1 --- platformapi/tiktok_shop/tiktok_api/sku.go | 8 ++++---- platformapi/tiktok_shop/tiktok_api/sku_test.go | 9 +-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/platformapi/tiktok_shop/tiktok_api/sku.go b/platformapi/tiktok_shop/tiktok_api/sku.go index b830595b..fcce6792 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku.go +++ b/platformapi/tiktok_shop/tiktok_api/sku.go @@ -521,19 +521,19 @@ func (a *API) OrderUserInfoSensitive(orderId, name, tel, address string) { } // GetProductUpdateRule 查询分类是否支持七天无理由退货 -func (a *API) GetProductUpdateRule(categoryId int64) bool { +func (a *API) GetProductUpdateRule(categoryId int64) (bool, string) { request := product_getProductUpdateRule_request.New() param := request.GetParams() param.CategoryId = categoryId result, err := request.Execute(a.accessTokenObj) if err != nil { - return false + return false, "" } if result.Code != RequestSuccessCode { - return false + return false, "" } - return result.Data.AfterSaleRule.SupplyDayReturnRule.Enable + return result.Data.AfterSaleRule.SupplyDayReturnRule.Enable, result.Data.AfterSaleRule.SupplyDayReturnRule.Options[0].Value } // GetProductUpdateRule2 查询分类是否支持七天无理由退货 diff --git a/platformapi/tiktok_shop/tiktok_api/sku_test.go b/platformapi/tiktok_shop/tiktok_api/sku_test.go index 8ffe3780..5d07933a 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_test.go @@ -134,7 +134,7 @@ func TestEditStoreCommodity(t *testing.T) { WhiteBackGroundPicUrl: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/VqGYBUaL_m_4bf295c4d3b6466138c5650a4d433935_sx_504060_www800-800", LongPicUrl: "", AfterSaleService: map[string]string{ - "supply_day_return_selector": "7", + "supply_day_return_selector": "7-0", }, SellChannel: []int64{0}, DelayRule: nil, @@ -151,13 +151,6 @@ func TestEditStoreCommodity(t *testing.T) { t.Fatal(err) } -func TestStoreName(t *testing.T) { - address := `闵庄南路京泉馨苑便民市场卖菜的第二家` - subStr := "海淀区" - index := strings.LastIndex(address, subStr) - fmt.Println(address[index+len(subStr):]) -} - // 上架2 func TestEditStoreCommodity2(t *testing.T) { a.EditStoreCommodityCommit(&product_editV2_commit_request.ProductEditV2Param2{