|
|
@ -60,6 +60,7 @@ type ArgsSkuAdd struct {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type SkuImg struct {
|
|
|
|
type SkuImg struct {
|
|
|
|
|
|
|
|
Id uint `json:"id"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -224,3 +225,28 @@ func (s *sku) DownShelves(ctx context.Context, args ArgsSkuDownShelves) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return xClient.Call(ctx, "DownShelves", args, &reply)
|
|
|
|
return xClient.Call(ctx, "DownShelves", args, &reply)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// GetImgs @Title 获取预览图
|
|
|
|
|
|
|
|
func (s *sku) GetImgs(ctx context.Context, skuId uint) error {
|
|
|
|
|
|
|
|
reply := 0
|
|
|
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return xClient.Call(ctx, "GetImgs", skuId, &reply)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type ArgsReplaceImg struct {
|
|
|
|
|
|
|
|
Id uint
|
|
|
|
|
|
|
|
ReplacePath string
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ReplaceImg @Title 替换图片
|
|
|
|
|
|
|
|
func (s *sku) ReplaceImg(ctx context.Context, args ArgsReplaceImg) (reply []SkuImg, err error) {
|
|
|
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
err = xClient.Call(ctx, "ReplaceImg", args, &reply)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|