From e67a84365d40581f28537e279631f87bf6bedc61 Mon Sep 17 00:00:00 2001 From: kanade Date: Tue, 22 Nov 2022 15:17:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8B=86=E5=8D=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/order.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/supply/channel/order.go b/supply/channel/order.go index ea21030..da7b614 100644 --- a/supply/channel/order.go +++ b/supply/channel/order.go @@ -136,6 +136,40 @@ func (o *order) Cancel(ctx context.Context, channelId string, args ArgsOrderChan return xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Cancel", args, &reply) } +type ArgsOrderSplit struct { + RootOrderSn string + ChannelOrderSn string +} +type ReplyOrderSplit struct { + OrderSn string `json:"orderSn"` + ChannelOrderSn string `json:"channelOrderSn"` + FreightFee decimal.Decimal `json:"freightFee"` + OrderFee decimal.Decimal `json:"orderFee"` + Skus []OrderSplitSkuItem `json:"skus"` + SubOrders []*OrderSubSplit `json:"subOrders"` +} +type OrderSubSplit struct { + OrderSn string `json:"orderSn"` + FreightFee decimal.Decimal `json:"freightFee"` + OrderFee decimal.Decimal `json:"orderFee"` + Skus []OrderSplitSkuItem `json:"skus"` + SubOrders []*OrderSubSplit `json:"subOrders"` +} +type OrderSplitSkuItem struct { + SkuId uint `json:"skuId"` + Quantity uint `json:"quantity"` +} + +// Split @Title 获取拆单信息 +func (o *order) Split(ctx context.Context, channelId string, args ArgsOrderSplit) (reply ReplyOrderSplit, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Split", args, &reply) + return +} + type OrderListsSearch struct { SkuName string // 商品名称 Status []uint // 订单状态