diff --git a/supply/channel/sku.go b/supply/channel/sku.go index 4eaa6b4..5914407 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -32,6 +32,7 @@ type SkuItem struct { ThirdCategoryId uint `json:"thirdCategoryId"` ThirdCategoryName string `json:"thirdCategoryName"` Price decimal.Decimal `json:"price"` + Discount decimal.Decimal `json:"discount"` GuidePrice decimal.Decimal `json:"guidePrice"` ImgUrl string `json:"imgUrl"` Profit decimal.Decimal `json:"profit"` @@ -62,6 +63,37 @@ func (s *sku) Lists(ctx context.Context, channelId string, args ArgsSkuList) (re return } +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 // 最高折扣 +} +type ArgsSkuListsEs struct { + Search SkuEsSearch + Page bean.Page +} + +// ListsEs @Title es商品列表 目前最大10000条数据,超出不显示 +func (s *sku) ListsEs(ctx context.Context, channelId string, args ArgsSkuListsEs) (reply ReplySkuList, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "ListsEs", args, &reply) + return +} + type ArgsSkuDetails struct { SkuIds []uint // sku数组 }