From bed50a561be39f9b88756025820ebf033fc607bc Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 29 Sep 2022 16:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/supply/order.go b/supply/order.go index 03716a6..ca669d2 100644 --- a/supply/order.go +++ b/supply/order.go @@ -145,3 +145,44 @@ func (o *order) Lists(ctx context.Context, args ArgsRetailOrderLists) (reply Rep err = xClient.Call(ctx, "Lists", args, &reply) return } + +type OrderInfo struct { + OrderId uint `json:"orderId"` + CustomerId uint `json:"customerId"` + OrderSn uint64 `json:"orderSn"` + ReceiverName string `json:"receiverName"` + ReceiverMobile string `json:"receiverMobile"` + Address string `json:"address"` + FreightFee decimal.Decimal `json:"freightFee"` + OrderFee decimal.Decimal `json:"orderFee"` + PayTime int64 `json:"payTime"` + FinishAt int64 `json:"finishAt"` + Status uint `json:"status"` + Skus []OrderSku `json:"skus"` + Packages []OrderPackage `json:"packages"` +} + +type OrderSku struct { + Id uint `json:"id"` + SkuId uint `json:"skuId"` + Name string `json:"name"` + SupplyPrice decimal.Decimal `json:"supplyPrice"` + Rate decimal.Decimal `json:"rate"` + ImgUrl string `json:"imgUrl"` + Quantity uint `json:"quantity"` +} + +type OrderPackage struct { + LogisticsName string `json:"logisticsName"` + WaybillCode string `json:"waybillCode"` +} + +// Info @Title 订单详情 +func (o *order) Info(ctx context.Context, orderSn string) (reply OrderInfo, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + err = xClient.Call(ctx, "Info", orderSn, &reply) + return +}