From 508fb8ea5480e2341162f1e0df1b50c1c3122224 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 18 Aug 2022 11:27:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E7=BB=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/sku.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/supply/channel/sku.go b/supply/channel/sku.go index 44e0986..265225f 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -143,6 +143,25 @@ func (s *sku) Prices(ctx context.Context, channelId string, args ArgsSkuPrices) return } +type ArgsSkuGroups struct { + SkuIds []uint // sku数组 +} + +type SkuGroup struct { + SkuId uint `json:"skuId"` + GroupSkuIds []uint `json:"groupSkuIds"` +} + +// Groups @Title 获取sku分组信息 +func (s *sku) Groups(ctx context.Context, channelId string, args ArgsSkuGroups) (reply []SkuGroup, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Groups", args, &reply) + return +} + type ArgsSkuStock struct { Address string // 地址 Skus []SkuStockItem // sku信息