|
|
@ -49,16 +49,12 @@ func (b *brand) Edit(ctx context.Context, args ArgsBrandEdit) error {
|
|
|
|
return xClient.Call(ctx, "Edit", args, &reply)
|
|
|
|
return xClient.Call(ctx, "Edit", args, &reply)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type ArgsImport struct {
|
|
|
|
// FindBrandByName @Title 根据品牌名称获取全部品牌
|
|
|
|
Name string // 品牌名称
|
|
|
|
func (b *brand) FindBrandByName(ctx context.Context, name string) (reply []BrandItem, err error) {
|
|
|
|
SupplyBrandId uint // 匹配的品牌Id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (b *brand) Import(ctx context.Context, args []ArgsImport) error {
|
|
|
|
|
|
|
|
reply := 0
|
|
|
|
|
|
|
|
xClient, err := client.GetClient(b)
|
|
|
|
xClient, err := client.GetClient(b)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return xClient.Call(ctx, "Import", args, &reply)
|
|
|
|
err = xClient.Call(ctx, "FindBrandByName", name, &reply)
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|