修改渠道参数

finance
杨赟 2 years ago
parent b79986a288
commit d3d514dad2

@ -4,6 +4,7 @@ import (
"context" "context"
"git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/client"
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/smallnest/rpcx/share"
) )
type order struct { type order struct {
@ -25,8 +26,8 @@ type ReplyOrderFreightFee struct {
} }
// FreightFee @Title 获取运费 // FreightFee @Title 获取运费
func (o *order) FreightFee(ctx context.Context, args ArgsOrderFreightFee) (reply []ReplyOrderFreightFee, err error) { func (o *order) FreightFee(ctx context.Context, channelId string, args ArgsOrderFreightFee) (reply []ReplyOrderFreightFee, err error) {
err = client.GetClient(o).Call(ctx, "FreightFee", args, &reply) err = client.GetClient(o).Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "FreightFee", args, &reply)
return return
} }
@ -50,7 +51,7 @@ type ReplyOrderSubmit struct {
} }
// Submit @Title 下单 // Submit @Title 下单
func (o *order) Submit(ctx context.Context, args ArgsOrderSubmit) (reply []ReplyOrderSubmit, err error) { func (o *order) Submit(ctx context.Context, channelId string, args ArgsOrderSubmit) (reply []ReplyOrderSubmit, err error) {
err = client.GetClient(o).Call(ctx, "Submit", args, &reply) err = client.GetClient(o).Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Submit", args, &reply)
return return
} }

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

Loading…
Cancel
Save