diff --git a/jd/brand.go b/jd/brand.go index 3ad00d1..6a1e96b 100644 --- a/jd/brand.go +++ b/jd/brand.go @@ -49,16 +49,12 @@ func (b *brand) Edit(ctx context.Context, args ArgsBrandEdit) error { return xClient.Call(ctx, "Edit", args, &reply) } -type ArgsImport struct { - Name string // 品牌名称 - SupplyBrandId uint // 匹配的品牌Id -} - -func (b *brand) Import(ctx context.Context, args []ArgsImport) error { - reply := 0 +// FindBrandByName @Title 根据品牌名称获取全部品牌 +func (b *brand) FindBrandByName(ctx context.Context, name string) (reply []BrandItem, err error) { xClient, err := client.GetClient(b) if err != nil { - return err + return nil, err } - return xClient.Call(ctx, "Import", args, &reply) + err = xClient.Call(ctx, "FindBrandByName", name, &reply) + return } diff --git a/jd/sku.go b/jd/sku.go index 79574e2..8830e71 100644 --- a/jd/sku.go +++ b/jd/sku.go @@ -238,3 +238,13 @@ func (s *sku) ReplaceImgJdSku(ctx context.Context, args ArgsSkuReplaceImgJdSku) } return xClient.Call(ctx, "ReplaceImgJdSku", args, &reply) } + +// ReHandle @Title 重新处理商品 +func (s *sku) ReHandle(ctx context.Context, skuId uint) error { + reply := 0 + xClient, err := client.GetClient(s) + if err != nil { + return err + } + return xClient.Call(ctx, "ReHandle", skuId, &reply) +}