From 3fb66d388e2b27d913b568f7a967ad54d748a370 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 27 Oct 2022 16:07:28 +0800 Subject: [PATCH 1/4] =?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/supplier.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/supplier/supplier.go b/supplier/supplier.go index 88101ec..0a0902b 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -151,3 +151,18 @@ func (s *supplier) UpdateWarn(ctx context.Context, args ArgsSupplierUpdateWarn) reply := 0 return xClient.Call(ctx, "UpdateWarn", args, &reply) } + +type ReplySupplierItem struct { + Id uint `json:"id"` + Name string `json:"name"` +} + +// Select @Title 筛选非禁用的供应商 +func (s *supplier) Select(ctx context.Context, status uint) (reply []ReplyByIdItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "Select", status, &reply) + return +} From a8632a1dbbad4ee732f1954b21f1ddd9e99fa7c3 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 27 Oct 2022 16:14:58 +0800 Subject: [PATCH 2/4] =?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/supplier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/supplier.go b/supplier/supplier.go index 0a0902b..64fafe3 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -158,7 +158,7 @@ type ReplySupplierItem struct { } // Select @Title 筛选非禁用的供应商 -func (s *supplier) Select(ctx context.Context, status uint) (reply []ReplyByIdItem, err error) { +func (s *supplier) Select(ctx context.Context, status uint) (reply []ReplySupplierItem, err error) { xClient, err := client.GetClient(s) if err != nil { return nil, err From 08facd05ebb4bc9867713b39af9b8ade0bce29a3 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 27 Oct 2022 17:18:22 +0800 Subject: [PATCH 3/4] =?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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supplier/goods.go b/supplier/goods.go index bed9bb8..5bad243 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -178,11 +178,11 @@ type ReplyByIdItem struct { } // FindBySkuIds @Title 根据商品Ids获取商品信息 -func (g *goods) FindBySkuIds(ctx context.Context, goodsIds []uint) (reply []ReplyByIdItem, err error) { +func (g *goods) 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", goodsIds, &reply) + err = xClient.Call(ctx, "FindBySkuIds", skuIds, &reply) return } From 8fdced2bc896a3b173c31758ad66af317924d31a Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 28 Oct 2022 09:30:39 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/sku/item.go | 10 ++++++++++ customer/sku/sale.go | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/customer/sku/item.go b/customer/sku/item.go index c1a5b8d..c553cca 100644 --- a/customer/sku/item.go +++ b/customer/sku/item.go @@ -69,3 +69,13 @@ func (i *item) Lists(ctx context.Context, args ArgsSkuItemLists) (reply ReplySku err = xClient.Call(ctx, "Lists", args, &reply) return } + +// DelAll @Title 删除全部商品 +func (i *item) DelAll(ctx context.Context, skuTypeId uint) error { + xClient, err := client.GetClient(i) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "DelAll", skuTypeId, &reply) +} diff --git a/customer/sku/sale.go b/customer/sku/sale.go index f110a00..8e074c7 100644 --- a/customer/sku/sale.go +++ b/customer/sku/sale.go @@ -79,3 +79,14 @@ func (s *sale) GetImg(ctx context.Context) (reply string, err error) { err = xClient.Call(ctx, "GetImg", args, &reply) return } + +// DelAll @Title 删除全部商品 +func (s *sale) DelAll(ctx context.Context) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + args := 0 + reply := 0 + return xClient.Call(ctx, "DelAll", args, &reply) +}