From 07ee54e06ec7b87620c20d3095a8c640702f11a7 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 30 Aug 2022 10:02:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/supplier/goods.go b/supplier/goods.go index 9e636c2..bf199ad 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -65,11 +65,25 @@ type ReplyGoodsLists struct { } // Lists @Title 获取商品列表 -func (s *goods) Lists(ctx context.Context, args ArgsGoodsList) (reply ReplyGoodsLists, err error) { - xClient, err := client.GetClient(s) +func (g *goods) Lists(ctx context.Context, args ArgsGoodsList) (reply ReplyGoodsLists, err error) { + xClient, err := client.GetClient(g) if err != nil { return } err = xClient.Call(ctx, "Lists", args, &reply) return } + +type ArgsGoodsInfo struct { + SkuId uint +} + +// Info @Title 商品详情 +func (g *goods) Info(ctx context.Context, skuId uint) (reply uint, err error) { + xClient, err := client.GetClient(g) + if err != nil { + return + } + err = xClient.Call(ctx, "Info", skuId, &reply) + return +}