|
|
@ -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,29 @@ 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) (reply []SkuImg, err error) {
|
|
|
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
err = xClient.Call(ctx, "GetImgs", skuId, &reply)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type ArgsReplaceImg struct {
|
|
|
|
|
|
|
|
Id uint
|
|
|
|
|
|
|
|
ReplacePath string
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ReplaceImg @Title 替换图片
|
|
|
|
|
|
|
|
func (s *sku) ReplaceImg(ctx context.Context, args ArgsReplaceImg) (err error) {
|
|
|
|
|
|
|
|
reply := 0
|
|
|
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
err = xClient.Call(ctx, "ReplaceImg", args, &reply)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|