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) +} 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 } diff --git a/supplier/supplier.go b/supplier/supplier.go index 88101ec..64fafe3 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 []ReplySupplierItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "Select", status, &reply) + return +}