|
|
|
@ -5,6 +5,7 @@ import (
|
|
|
|
|
"git.oa00.com/supply-chain/service/client"
|
|
|
|
|
"git.oa00.com/supply-chain/service/lib/bean"
|
|
|
|
|
"github.com/shopspring/decimal"
|
|
|
|
|
"github.com/smallnest/rpcx/share"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type sku struct {
|
|
|
|
@ -49,8 +50,8 @@ type ReplySkuList struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Lists @Title 商品列表
|
|
|
|
|
func (s *sku) Lists(ctx context.Context, args ArgsSkuList) (reply ReplySkuList, err error) {
|
|
|
|
|
err = client.GetClient(s).Call(ctx, "Lists", args, &reply)
|
|
|
|
|
func (s *sku) Lists(ctx context.Context, channelId string, args ArgsSkuList) (reply ReplySkuList, err error) {
|
|
|
|
|
err = client.GetClient(s).Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Lists", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -101,8 +102,8 @@ type SkuAttribute struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Details @Title 获取sku详情
|
|
|
|
|
func (s *sku) Details(ctx context.Context, args ArgsSkuDetails) (reply []SkuDetailItem, err error) {
|
|
|
|
|
err = client.GetClient(s).Call(ctx, "Details", args, &reply)
|
|
|
|
|
func (s *sku) Details(ctx context.Context, channelId string, args ArgsSkuDetails) (reply []SkuDetailItem, err error) {
|
|
|
|
|
err = client.GetClient(s).Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Details", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -122,7 +123,7 @@ type ReplySkuStock struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Stock @Title 库存查询
|
|
|
|
|
func (s *sku) Stock(ctx context.Context, args ArgsSkuStock) (reply []ReplySkuStock, err error) {
|
|
|
|
|
err = client.GetClient(s).Call(ctx, "Stock", args, &reply)
|
|
|
|
|
func (s *sku) Stock(ctx context.Context, channelId string, args ArgsSkuStock) (reply []ReplySkuStock, err error) {
|
|
|
|
|
err = client.GetClient(s).Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Stock", args, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|