|
|
@ -60,7 +60,6 @@ type ArgsSkuAdd struct {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type SkuImg struct {
|
|
|
|
type SkuImg struct {
|
|
|
|
Id uint `json:"id"`
|
|
|
|
|
|
|
|
Path string `json:"path"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -181,7 +180,7 @@ type SkuInfo struct {
|
|
|
|
TaxName string `json:"taxName"`
|
|
|
|
TaxName string `json:"taxName"`
|
|
|
|
TaxCode string `json:"taxCode"`
|
|
|
|
TaxCode string `json:"taxCode"`
|
|
|
|
Unit string `json:"unit"`
|
|
|
|
Unit string `json:"unit"`
|
|
|
|
Imgs []SkuImg `json:"imgs"`
|
|
|
|
Imgs []SkuImgItem `json:"imgs"`
|
|
|
|
Reason string `json:"reason"`
|
|
|
|
Reason string `json:"reason"`
|
|
|
|
Specifications []SkuSpecification `json:"specification"`
|
|
|
|
Specifications []SkuSpecification `json:"specification"`
|
|
|
|
PlatformStatus uint `json:"platformStatus"`
|
|
|
|
PlatformStatus uint `json:"platformStatus"`
|
|
|
@ -191,6 +190,11 @@ type SkuInfo struct {
|
|
|
|
AdjustPrice decimal.Decimal `json:"adjustPrice"`
|
|
|
|
AdjustPrice decimal.Decimal `json:"adjustPrice"`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type SkuImgItem struct {
|
|
|
|
|
|
|
|
Id uint `json:"id"`
|
|
|
|
|
|
|
|
Path string `json:"path"`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Info @Title 商品信息
|
|
|
|
// Info @Title 商品信息
|
|
|
|
func (s *sku) Info(ctx context.Context, skuId uint) (reply SkuInfo, err error) {
|
|
|
|
func (s *sku) Info(ctx context.Context, skuId uint) (reply SkuInfo, err error) {
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
@ -230,7 +234,7 @@ func (s *sku) DownShelves(ctx context.Context, args ArgsSkuDownShelves) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetImgs @Title 获取预览图
|
|
|
|
// GetImgs @Title 获取预览图
|
|
|
|
func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImg, err error) {
|
|
|
|
func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImgItem, err error) {
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|