From e6a11799a48b1a00c3ddbcedb919cc93a7458e8c Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 31 Mar 2023 17:04:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/sku.go | 58 ++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/supply/channel/sku.go b/supply/channel/sku.go index bd16149..6a6fd8c 100644 --- a/supply/channel/sku.go +++ b/supply/channel/sku.go @@ -28,32 +28,36 @@ type ArgsSkuList struct { Page bean.Page } +type SkuItemHighlight struct { + Name string `json:"name"` +} type SkuItem struct { - Id uint `json:"id"` - Name string `json:"name"` - BrandId uint `json:"brandId"` - BrandName string `json:"brandName"` - FirstCategoryId uint `json:"firstCategoryId"` - FirstCategoryName string `json:"firstCategoryName"` - SecondCategoryId uint `json:"secondCategoryId"` - SecondCategoryName string `json:"secondCategoryName"` - 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"` - Size string `json:"size"` - Color string `json:"color"` - Tax string `json:"tax"` - Unit string `json:"unit"` - UpcCode string `json:"upcCode"` - TaxName string `json:"taxName"` - TaxCode string `json:"taxCode"` - Status uint `json:"status"` - CreatedAt int64 `json:"createdAt"` - UpdatedAt int64 `json:"updatedAt"` + Id uint `json:"id"` + Name string `json:"name"` + BrandId uint `json:"brandId"` + BrandName string `json:"brandName"` + FirstCategoryId uint `json:"firstCategoryId"` + FirstCategoryName string `json:"firstCategoryName"` + SecondCategoryId uint `json:"secondCategoryId"` + SecondCategoryName string `json:"secondCategoryName"` + 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"` + Size string `json:"size"` + Color string `json:"color"` + Tax string `json:"tax"` + Unit string `json:"unit"` + UpcCode string `json:"upcCode"` + TaxName string `json:"taxName"` + TaxCode string `json:"taxCode"` + Status uint `json:"status"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` + Highlight SkuItemHighlight `json:"highlight"` } type ReplySkuList struct { @@ -98,8 +102,12 @@ type SkuEsSearch struct { OrderType uint // 排序类型 OrderSort uint // 排序顺序 } +type SkuEsConfig struct { + Highlight bool +} type ArgsSkuListsEs struct { Search SkuEsSearch + Config SkuEsConfig Page bean.Page }