|
|
|
@ -119,6 +119,30 @@ func (s *sku) Details(ctx context.Context, channelId string, args ArgsSkuDetails
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsSkuPrices struct {
|
|
|
|
|
SkuIds []uint // sku数组
|
|
|
|
|
}
|
|
|
|
|
type SkuPrice struct {
|
|
|
|
|
Id uint `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Price decimal.Decimal `json:"price"`
|
|
|
|
|
GuidePrice decimal.Decimal `json:"guidePrice"`
|
|
|
|
|
Profit decimal.Decimal `json:"profit"`
|
|
|
|
|
Status uint `json:"status"`
|
|
|
|
|
CreatedAt int64 `json:"createdAt"`
|
|
|
|
|
UpdatedAt int64 `json:"updatedAt"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Prices @Title 获取sku价格
|
|
|
|
|
func (s *sku) Prices(ctx context.Context, channelId string, args ArgsSkuPrices) (reply []SkuPrice, err error) {
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Prices", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsSkuStock struct {
|
|
|
|
|
Address string // 地址
|
|
|
|
|
Skus []SkuStockItem // sku信息
|
|
|
|
|