From ecf0b36ce3788be50e65592111ec778681685818 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 31 Aug 2022 10:39:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/sku.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index b93b428..d57fb00 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -60,7 +60,6 @@ type ArgsSkuAdd struct { } type SkuImg struct { - Id uint `json:"id"` Path string `json:"path"` } @@ -181,7 +180,7 @@ type SkuInfo struct { TaxName string `json:"taxName"` TaxCode string `json:"taxCode"` Unit string `json:"unit"` - Imgs []SkuImg `json:"imgs"` + Imgs []SkuImgItem `json:"imgs"` Reason string `json:"reason"` Specifications []SkuSpecification `json:"specification"` PlatformStatus uint `json:"platformStatus"` @@ -191,6 +190,11 @@ type SkuInfo struct { AdjustPrice decimal.Decimal `json:"adjustPrice"` } +type SkuImgItem struct { + Id uint `json:"id"` + Path string `json:"path"` +} + // Info @Title 商品信息 func (s *sku) Info(ctx context.Context, skuId uint) (reply SkuInfo, err error) { xClient, err := client.GetClient(s) @@ -230,7 +234,7 @@ func (s *sku) DownShelves(ctx context.Context, args ArgsSkuDownShelves) error { } // 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) if err != nil { return nil, err