From 9163484778c1271f92e5a42429042448b52e422f Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 19 Dec 2022 10:53:11 +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 --- otosaas/commodity.go | 55 ++++++++++++++++---------------------------- supply/sku.go | 1 + 2 files changed, 21 insertions(+), 35 deletions(-) diff --git a/otosaas/commodity.go b/otosaas/commodity.go index 0558d78..1005bc2 100644 --- a/otosaas/commodity.go +++ b/otosaas/commodity.go @@ -63,8 +63,8 @@ type ReplyCommodityLists struct { } // Lists @Title 获取商品列表 -func (g *commodity) Lists(ctx context.Context, args ArgsCommodityList) (reply ReplyCommodityLists, err error) { - xClient, err := client.GetClient(g) +func (c *commodity) Lists(ctx context.Context, args ArgsCommodityList) (reply ReplyCommodityLists, err error) { + xClient, err := client.GetClient(c) if err != nil { return } @@ -107,8 +107,8 @@ type SkuItem struct { } // Info @Title 商品详情 -func (g *commodity) Info(ctx context.Context, goodsId uint) (reply ReplyCommodityInfo, err error) { - xClient, err := client.GetClient(g) +func (c *commodity) Info(ctx context.Context, goodsId uint) (reply ReplyCommodityInfo, err error) { + xClient, err := client.GetClient(c) if err != nil { return } @@ -122,8 +122,8 @@ type ReplyImgs struct { } // GetImgs @Title 获取商品主图 -func (g *commodity) GetImgs(ctx context.Context, goodsIds []uint) (reply []ReplyImgs, err error) { - xClient, err := client.GetClient(g) +func (c *commodity) GetImgs(ctx context.Context, goodsIds []uint) (reply []ReplyImgs, err error) { + xClient, err := client.GetClient(c) if err != nil { return } @@ -138,8 +138,8 @@ type AdoptItem struct { } // Adopt @Title 批量入库 -func (g *commodity) Adopt(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { - xClient, err := client.GetClient(g) +func (c *commodity) Adopt(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { + xClient, err := client.GetClient(c) if err != nil { return } @@ -148,8 +148,8 @@ func (g *commodity) Adopt(ctx context.Context, goodsIds []uint) (reply []AdoptIt } // Discard @Title 批量废弃 -func (g *commodity) Discard(ctx context.Context, goodsIds []uint) (err error) { - xClient, err := client.GetClient(g) +func (c *commodity) Discard(ctx context.Context, goodsIds []uint) (err error) { + xClient, err := client.GetClient(c) if err != nil { return } @@ -158,28 +158,13 @@ func (g *commodity) Discard(ctx context.Context, goodsIds []uint) (err error) { return } -// ReHandle @Title 重新处理商品 -func (g *commodity) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { - xClient, err := client.GetClient(g) - if err != nil { - return nil, err - } - err = xClient.Call(ctx, "ReHandle", goodsIds, &reply) - return -} - -type ReplyByIdItem struct { - SkuId uint `json:"skuId"` - SupplierId uint `json:"supplierIds"` - SupplierName string `json:"supplierName"` -} - -// FindBySkuIds @Title 根据商品Ids获取商品信息 -func (g *commodity) FindBySkuIds(ctx context.Context, skuIds []uint) (reply []ReplyByIdItem, err error) { - xClient, err := client.GetClient(g) - if err != nil { - return nil, err - } - err = xClient.Call(ctx, "FindBySkuIds", skuIds, &reply) - return -} +// +//// ReHandle @Title 重新处理商品 +//func (c *commodity) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptItem, err error) { +// xClient, err := client.GetClient(c) +// if err != nil { +// return nil, err +// } +// err = xClient.Call(ctx, "ReHandle", goodsIds, &reply) +// return +//} diff --git a/supply/sku.go b/supply/sku.go index 653560c..f7dc7a7 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -15,6 +15,7 @@ type source uint const ( SkuSourceJd source = 1 // 京东开普勒渠道 SkuSourceSupplier source = 2 // 供应链供应商渠道 + SkuSourceOtoSaas source = 3 // 海旅供应商渠道 ) const (