From 96f75eb74fcd73d972967bc19ceb94c708dacdf9 Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 14 Jun 2024 16:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/supply/order.go b/supply/order.go index db128e6..b3363ec 100644 --- a/supply/order.go +++ b/supply/order.go @@ -4,7 +4,6 @@ import ( "context" "git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/lib/bean" - _interface "git.oa00.com/supply-chain/service/supply/interface" "github.com/shopspring/decimal" ) @@ -267,8 +266,34 @@ func (o *order) InfoByOrderId(ctx context.Context, orderId uint) (reply InfoByOr return } +type ReplySubmitData struct { + OrderSn string `json:"orderSn"` + Status int64 `json:"status"` + OrderFee decimal.Decimal `json:"orderFee"` + FreightFee decimal.Decimal `json:"freightFee"` + LadingBillAt int64 `json:"ladingBillAt"` + Skus []ReplySubmitDataSku `json:"skus"` + OrderSubs []ReplySubmitDataOrderSub `json:"orderSubs"` +} +type ReplySubmitDataOrderSub struct { + OrderSubSn uint64 `json:"orderSubSn"` + SourceId uint `json:"sourceId"` + OrderFee decimal.Decimal `json:"orderFee"` + SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` + SourceName string `json:"sourceName"` + SourceOrderName string `json:"sourceOrderName"` +} +type ReplySubmitDataSku struct { + SkuId string `json:"skuId"` + Name string `json:"name"` + Quantity int64 `json:"quantity"` + SupplyPrice decimal.Decimal `json:"supplyPrice"` + GuidePrice decimal.Decimal `json:"guidePrice"` + Amount decimal.Decimal `json:"amount"` +} + // SubmitData @Title 订单下单数据 -func (o *order) SubmitData(ctx context.Context, orderId int64) (reply _interface.ReplySubmitData, err error) { +func (o *order) SubmitData(ctx context.Context, orderId int64) (reply ReplySubmitData, err error) { xClient, err := client.GetClient(o) if err != nil { return