From 0b0e4902bd50687898a01ecfed3ef10193d2843c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 14 Nov 2022 15:20:50 +0800 Subject: [PATCH] 1 --- platformapi/tiktok_shop/tiktok_api/afs_test.go | 4 ++-- platformapi/tiktok_shop/tiktok_api/sku_test.go | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/platformapi/tiktok_shop/tiktok_api/afs_test.go b/platformapi/tiktok_shop/tiktok_api/afs_test.go index 4c6d4c38..5e220172 100644 --- a/platformapi/tiktok_shop/tiktok_api/afs_test.go +++ b/platformapi/tiktok_shop/tiktok_api/afs_test.go @@ -13,12 +13,12 @@ var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token // 查询售后单详情 func TestAfsOrder(t *testing.T) { - a.QueryAfsOrderDetail("7154266161041899779", true) + a.QueryAfsOrderDetail("7165706329204670732", true) } // 同意/拒绝售后单 func TestAggreOrNotAggreAfs(t *testing.T) { - a.AfterSaleOperate(int32(202), "7161251923629179177", "1", 0) + a.AfterSaleOperate(int32(201), "7165706329204670732", "1", 0) fmt.Println("11", 8|16|32|1) } diff --git a/platformapi/tiktok_shop/tiktok_api/sku_test.go b/platformapi/tiktok_shop/tiktok_api/sku_test.go index 1e7c9523..eb311281 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_test.go @@ -62,8 +62,9 @@ func TestCreateStoreCommodity(t *testing.T) { FreightId: 11111, // 运费模板id //Weight: 0, //WeightUnit: 0, - DeliveryDelayDay: DeliveryDelayDayToDay, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填 - PresellType: SendGoodsTypeNow, // 0现发货/1预售发货/2阶梯发货 + DeliveryDelayDay: DeliveryDelayDayTomorrow, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填 + PresellType: 1, // 0现发货/1预售发货/2阶梯发货 + PresellConfigLevel: 1, // 0现发货/1预售发货/2阶梯发货 //PresellDelay: 0, //PresellEndTime: "", //Supply7dayReturn: 0, @@ -116,13 +117,16 @@ func TestCreateStoreCommodity(t *testing.T) { category, err := a.GetCatePropertyV2(param.CategoryLeafId) format := make(map[string][]*ProductFormatNewList, 0) for _, v := range category.Data.Data { + if v.Required != 1 { + continue + } for _, d := range v.Options { formateNew := &ProductFormatNewList{ Value: utils.Str2Int64(d.Value), Name: d.Name, DiyType: v.DiyType, } - format[utils.Int64ToStr(v.CategoryId)] = append(format[utils.Int64ToStr(v.CategoryId)], formateNew) + format[utils.Int64ToStr(v.PropertyId)] = append(format[utils.Int64ToStr(v.PropertyId)], formateNew) } } productFormatNew, err := json.Marshal(format) @@ -268,12 +272,11 @@ func TestEditStoreCommodity(t *testing.T) { data, _ := a.GetSkuDetail("3580251132888538614", "") globals.SugarLogger.Debugf("=============%s", data.ProductFormatNew) specPrice, _ := json.Marshal(data.SpecPrices) - specs, _ := json.Marshal(data.Specs) a.EditStoreCommodity(&product_editV2_request.ProductEditV2Param{ ProductId: 1748169491056643, ProductFormatNew: data.ProductFormatNew, SpecPrices: string(specPrice), - Specs: string(specs), + Specs: "重量|250g", Commit: true, }) }