From ed5e52628a066d3c2a5ecb4d68e2974959e365dc 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:38:13 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/system_store_sku.go | 7 +++---- .../purchase/tiktok_store/store_sku2_utils.go | 17 +++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/business/jxstore/cms/system_store_sku.go b/business/jxstore/cms/system_store_sku.go index 0854e5f8a..6046c40ad 100644 --- a/business/jxstore/cms/system_store_sku.go +++ b/business/jxstore/cms/system_store_sku.go @@ -649,10 +649,9 @@ func BatchInitSkuMT2TT(ctx *jxcontext.Context, fromSku []*mtwmapi.AppFood, fromS } // 是否支持七天无理由 - if toApi.GetProductUpdateRule(param.CategoryLeafId) { - param.Supply7dayReturn = 1 - } else { - param.Supply7dayReturn = 0 + isAfterSale, rule := toApi.GetProductUpdateRule(param.CategoryLeafId) + if isAfterSale { + param.AfterSaleService = map[string]string{"supply_day_return_selector": fmt.Sprintf("%s", rule)} } // weight_unit 目前抖音只支持g和kg两种 diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index d8d509a0f..b47246389 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -285,8 +285,9 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI ProductFormatNew: param.ProductFormatNew, } // 是否支持七天无理由 - if api.GetProductUpdateRule(param.CategoryLeafId) { - param.AfterSaleService = map[string]string{"supply_day_return_selector": "7天"} + isAfterSale, rule := api.GetProductUpdateRule(param.CategoryLeafId) + if isAfterSale { + param.AfterSaleService = map[string]string{"supply_day_return_selector": fmt.Sprintf("%s", rule)} } updateParam.Pic = param.Pic updateParam.Description = param.Description @@ -385,10 +386,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI param.CategoryLeafId = vendorCategoryId } - if api.GetProductUpdateRule(param.CategoryLeafId) { - param.AfterSaleService = map[string]string{"supply_day_return_selector": "7天"} + isAfterSale, rule := api.GetProductUpdateRule(param.CategoryLeafId) + if isAfterSale { + param.AfterSaleService = map[string]string{"supply_day_return_selector": fmt.Sprintf("%s", rule)} } - // 获取主商品id var mainIdInt int64 if storeSku.VendorMainId == "" { @@ -507,9 +508,9 @@ func makeMainProductSku(db *dao.DaoDB, api *tiktokShop.API, storeSku *dao.StoreS // param.CategoryLeafId = storeSku.VendorVendorCatID //} - // 是否支持七天无理由 - if api.GetProductUpdateRule(param.CategoryLeafId) { - param.AfterSaleService = map[string]string{"supply_day_return_selector": "7天"} + isAfterSale, rule := api.GetProductUpdateRule(param.CategoryLeafId) + if isAfterSale { + param.AfterSaleService = map[string]string{"supply_day_return_selector": fmt.Sprintf("%s", rule)} } // weight_unit 目前抖音只支持g和kg两种