From fef38f060e1625b61978f48e7f199dfed2d2041f Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 11 Oct 2022 16:07:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/sku.go | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/supply/channel/sku.go b/supply/channel/sku.go index 5914407..c3d73f3 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -64,20 +64,21 @@ func (s *sku) Lists(ctx context.Context, channelId string, args ArgsSkuList) (re } type SkuEsSearch struct { - Status uint // 1=上架 2=下架 - SkuName string // 商品名称 - BrandId uint // 品牌id - BrandName string // 品牌名称 全词匹配 - FirstCategoryId uint // 一级分类id - FirstCategoryName string // 一级分类名称 全词匹配 - SecondCategoryId uint // 二级分类id - SecondCategoryName string // 二级分类名称 全词匹配 - ThirdCategoryId uint // 三级分类id - ThirdCategoryName string // 三级分类名称 全词匹配 - MaxPrice decimal.Decimal // 最高金额 - MinPrice decimal.Decimal // 最低金额 - MinDiscount decimal.Decimal // 最低折扣 - MaxDiscount decimal.Decimal // 最高折扣 + Status uint // 1=上架 2=下架 + SkuName string // 商品名称 + BrandId uint // 品牌id + BrandName string // 品牌名称 全词匹配 + FirstCategoryId uint // 一级分类id + FirstCategoryName string // 一级分类名称 全词匹配 + SecondCategoryId uint // 二级分类id + SecondCategoryName string // 二级分类名称 全词匹配 + ThirdCategoryId uint // 三级分类id + ThirdCategoryName string // 三级分类名称 全词匹配 + MaxPrice decimal.Decimal // 最高金额 + MinPrice decimal.Decimal // 最低金额 + MinDiscount decimal.Decimal // 最低折扣 + MaxDiscount decimal.Decimal // 最高折扣 + Expand []map[string]interface{} // 拓展查询 } type ArgsSkuListsEs struct { Search SkuEsSearch From b03604613ae86ad169743889fd589e62f62dadbf Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 12 Oct 2022 11:47:32 +0800 Subject: [PATCH 2/2] =?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 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/customer/sku/item.go b/customer/sku/item.go index 8171e24..e3d275c 100644 --- a/customer/sku/item.go +++ b/customer/sku/item.go @@ -29,14 +29,19 @@ func (i *item) Add(ctx context.Context, args ArgsSkuItemAdd) (reply []ReplySkuIt return } +type ArgsSkuItemDel struct { + SkuTypeId uint + SkuIds []uint +} + // Del @Title 删除商品 -func (i *item) Del(ctx context.Context, ids []uint) error { +func (i *item) Del(ctx context.Context, args ArgsSkuItemDel) error { xClient, err := client.GetClient(i) if err != nil { return err } reply := 0 - return xClient.Call(ctx, "Del", ids, &reply) + return xClient.Call(ctx, "Del", args, &reply) } type ArgsSkuItemLists struct {