From 27e2c299ec658a1352728f397a61993990035c4e Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 29 Jul 2022 09:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/brand.go | 11 +++++++++++ jd/sku.go | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/jd/brand.go b/jd/brand.go index ea7bf24..64f607f 100644 --- a/jd/brand.go +++ b/jd/brand.go @@ -39,3 +39,14 @@ func (b *brand) Edit(ctx context.Context, args ArgsBrandEdit) error { reply := 0 return client.GetClient(b).Call(ctx, "Edit", args, &reply) } + +type ArgsImport struct { + Name string // 品牌名称 + SupplyBrandId uint // 匹配的品牌Id + SupplyBrandName string // 匹配的品牌名称 +} + +func (b *brand) Import(ctx context.Context, args []ArgsImport) error { + reply := 0 + return client.GetClient(b).Call(ctx, "Import", args, &reply) +} diff --git a/jd/sku.go b/jd/sku.go index 2a1550f..3a85cd2 100644 --- a/jd/sku.go +++ b/jd/sku.go @@ -94,7 +94,7 @@ type SkuImg struct { } // GetImgs @Title 获取预览图 -func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImg, err error) { +func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply SkuImg, err error) { err = client.GetClient(s).Call(ctx, "GetImgs", skuId, &reply) return }