更新搜索

master
杨赟 7 months ago
parent 5d85dc3880
commit e27dfb1b3f

@ -196,9 +196,9 @@ type ArgsOrderLists struct {
}
type OrderItem struct {
OrderId uint `json:"orderId"`
OrderSn string `json:"orderSn"`
RootOrderSn string `json:"rootOrderSn"`
ChannelOrderSn string `json:"channelOrderSn"`
ReceiverName string `json:"receiverName"`
ReceiverMobile string `json:"receiverMobile"`
Address string `json:"address"`
@ -218,7 +218,6 @@ type OrderItem struct {
}
type OrderSku struct {
Id uint `json:"id"`
SkuId uint `json:"skuId"`
Name string `json:"name"`
Price decimal.Decimal `json:"price"`
@ -275,7 +274,6 @@ type OrderReceiver struct {
UserIp string `json:"userIp"`
}
type OrderDetailSku struct {
Id uint `json:"id"`
Quantity uint `json:"quantity"`
SkuId uint `json:"skuId"`
Price decimal.Decimal `json:"price"`

@ -6,6 +6,7 @@ import (
"git.oa00.com/supply-chain/service/lib/bean"
"github.com/shopspring/decimal"
"github.com/smallnest/rpcx/share"
"time"
)
type sku struct {
@ -58,11 +59,13 @@ type SkuItem struct {
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
Highlight SkuItemHighlight `json:"highlight"`
Tag []string `json:"tag"`
}
type ReplySkuList struct {
Lists []SkuItem `json:"lists"`
Total int64 `json:"total"`
ScrollId string `json:"scrollId"`
}
// Lists @Title 商品列表
@ -98,12 +101,14 @@ type SkuEsSearch struct {
Source uint // 所属供应商
ThirdCategoryIds []uint // 三级分类Ids
TagIds []uint // 标签Ids
Tag []string // 标签
OrderType uint // 排序类型
OrderSort uint // 排序顺序
}
type SkuEsConfig struct {
Highlight bool
Scroll time.Duration
}
type ArgsSkuListsEs struct {
Search SkuEsSearch
@ -121,6 +126,21 @@ func (s *sku) ListsEs(ctx context.Context, channelId string, args ArgsSkuListsEs
return
}
type ArgsSkuListsEsScroll struct {
Scroll time.Duration // 缓存时间
ScrollId string // 滚动标记id
}
// ListsEsScroll @Title es商品列表 目前最大10000条数据超出不显示
func (s *sku) ListsEsScroll(ctx context.Context, channelId string, args ArgsSkuListsEsScroll) (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}), "ListsEsScroll", args, &reply)
return
}
type ArgsSkuDetails struct {
SkuIds []uint // sku数组
}
@ -154,6 +174,7 @@ type SkuDetailItem struct {
Imgs []SkuImg `json:"imgs"`
Specifications []SkuSpecification `json:"specifications"`
GroupSkuIds []uint `json:"groupSkuIds"`
Tag []string `json:"tag"`
}
type SkuImg struct {
Path string `json:"path"`

@ -61,6 +61,7 @@ type ArgsSkuAdd struct {
Content string // 商品详情
Imgs []SkuImg // 商品图片 第一张主图
Specifications []SkuSpecification // 商品参数信息
Tag []string // 标签
}
type SkuImg struct {
@ -367,6 +368,7 @@ type ArgsSkuChangeData struct {
Source source // 商品来源
Imgs []string // 商品图片 第一张主图
Specifications []SkuSpecification // 商品参数信息
Tag []string // 标签
}
// ChangeData @Title 更新商品信息

Loading…
Cancel
Save