|
|
|
@ -76,7 +76,11 @@ type SkuAttribute struct {
|
|
|
|
|
// Add @Title 添加商品
|
|
|
|
|
func (s *sku) Add(ctx context.Context, args ArgsSkuAdd) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
return client.GetClient(s).Call(ctx, "Add", args, &reply)
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
return xClient.Call(ctx, "Add", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsSkuAdjust struct {
|
|
|
|
@ -89,7 +93,11 @@ type ArgsSkuAdjust struct {
|
|
|
|
|
// Adjust @Title 加价
|
|
|
|
|
func (s *sku) Adjust(ctx context.Context, args ArgsSkuAdjust) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
return client.GetClient(s).Call(ctx, "Adjust", args, &reply)
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
return xClient.Call(ctx, "Adjust", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsSkuLists struct {
|
|
|
|
@ -143,7 +151,11 @@ type SkuItem struct {
|
|
|
|
|
|
|
|
|
|
// Lists @Title 商品列表
|
|
|
|
|
func (s *sku) Lists(ctx context.Context, args ArgsSkuLists) (reply ReplySkuList, err error) {
|
|
|
|
|
err = client.GetClient(s).Call(ctx, "Lists", args, &reply)
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(ctx, "Lists", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -175,7 +187,11 @@ type SkuInfo struct {
|
|
|
|
|
|
|
|
|
|
// Info @Title 商品信息
|
|
|
|
|
func (s *sku) Info(ctx context.Context, skuId uint) (reply SkuInfo, err error) {
|
|
|
|
|
err = client.GetClient(s).Call(ctx, "Info", skuId, &reply)
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(ctx, "Info", skuId, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -190,13 +206,21 @@ type ArgsSkuDownShelves struct {
|
|
|
|
|
// OnShelves @Title 上架
|
|
|
|
|
func (s *sku) OnShelves(ctx context.Context, args ArgsSkuOnShelves) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
return client.GetClient(s).Call(ctx, "OnShelves", args, &reply)
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
return xClient.Call(ctx, "OnShelves", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DownShelves @Title 下架
|
|
|
|
|
func (s *sku) DownShelves(ctx context.Context, args ArgsSkuDownShelves) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
return client.GetClient(s).Call(ctx, "DownShelves", args, &reply)
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
return xClient.Call(ctx, "DownShelves", args, &reply)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsSkuAdjustType struct {
|
|
|
|
@ -209,5 +233,9 @@ type ArgsSkuAdjustType struct {
|
|
|
|
|
// EditAdjust @Title 修改改价类型
|
|
|
|
|
func (s *sku) EditAdjust(ctx context.Context, args ArgsSkuAdjustType) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
return client.GetClient(s).Call(ctx, "EditAdjust", args, &reply)
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
return xClient.Call(ctx, "EditAdjust", args, &reply)
|
|
|
|
|
}
|
|
|
|
|