From 029173a5cf1a12551cbea1abac4e8d152f26eea9 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 21 Apr 2023 15:56:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0rpc=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/supply/order.go b/supply/order.go index 4ba27a5..571a281 100644 --- a/supply/order.go +++ b/supply/order.go @@ -216,3 +216,36 @@ func (o *order) Info(ctx context.Context, orderSn string) (reply OrderInfo, err err = xClient.Call(ctx, "Info", orderSn, &reply) return } + +type InfoByOrderId struct { + Id uint + ChannelOrderSn string // 渠道订单编号 + OrderSn uint64 // 订单编号 + ChannelId uint // 渠道id + Type uint // 下单方式 1=api接口下单 2=客户商城下单 + Status uint // 状态 + OrderFee decimal.Decimal // 订单总金额-不含运费 + SupplyOrderFee decimal.Decimal // 供应商订单总金额-不含运费 + PayTime int64 // 确认时间 + Rate decimal.Decimal // 商品费率 + FreightFee decimal.Decimal // 运费 + ReceiverName string // 收件人 + ReceiverMobile string // 手机号 + ReceiverEmail string // 邮箱 + ReceiverZipCode string // 邮编 + Address string // 配送地址 + UserIp string // 用户ip + ExpireAt int64 // 订单提单超时时效时间 + LadingBillAt int64 // 提单时间 + CloseAt int64 // 订单关闭时间 +} + +// InfoByOrderId @Title 根据订单id查询详情 +func (o *order) InfoByOrderId(ctx context.Context, orderId uint) (reply InfoByOrderId, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + err = xClient.Call(ctx, "InfoByOrderId", orderId, &reply) + return +}