From 36db3cf494ab5755b9dd89a5766a805044596f50 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 9 Jun 2023 14:06:23 +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/data/order.go | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/supply/data/order.go b/supply/data/order.go index d0f5430..330aba4 100644 --- a/supply/data/order.go +++ b/supply/data/order.go @@ -17,11 +17,11 @@ type ArgsPayOrderLists struct { } type ReplyPayOrderLists struct { - Lists []OrderItem `json:"lists"` - Total int64 `json:"total"` + Lists []PayOrderItem `json:"lists"` + Total int64 `json:"total"` } -type OrderItem struct { +type PayOrderItem struct { SourceName string `json:"sourceName"` // 供应渠道 SourceSonName string `json:"sourceSonName"` // 供应商 CustomerName string `json:"customerName"` // 客户名 @@ -60,3 +60,41 @@ func (o *order) PayOrderList(ctx context.Context, args ArgsPayOrderLists) (resul err = xClient.Call(ctx, "PayOrderList", args, &result) return } + +type ArgsCancelOrderLists struct { + StartCancelAt string + EndCancelAt string + Page bean.Page +} + +type ReplyCancelOrderLists struct { + Lists []CancelOrderItem `json:"lists"` + Total int64 `json:"total"` +} +type CancelOrderItem struct { + SourceName string `json:"sourceName"` // 供应渠道 + SourceSonName string `json:"sourceSonName"` // 供应商 + CustomerName string `json:"customerName"` // 客户名 + OrderSn string `json:"orderSn"` // 原始订单号 + OrderSubSn string `json:"orderSubSn"` // 订单号 + SupplierOrderSn string `json:"supplierOrderSn"` // 供应商订单号 + OrderStatus uint `json:"orderStatus"` // 订单状态 + LadingBillAt int64 `json:"ladingBillAt"` // 支付时间 + StockOutAt int64 `json:"stockOutAt"` // 发货时间 + CancelAt int64 `json:"cancelAt"` // 取消时间 + + TotalPrice decimal.Decimal `json:"totalPrice"` // 商品金额 + FreightFee decimal.Decimal `json:"freightFee"` // 运费 + Price decimal.Decimal `json:"price"` // 销售合计金额 + RefundPrice decimal.Decimal `json:"refundPrice"` // 退款金额 +} + +// CancelOrderLists @Title 取消订单统计 +func (o *order) CancelOrderLists(ctx context.Context, args ArgsCancelOrderLists) (result ReplyCancelOrderLists, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + err = xClient.Call(ctx, "CancelOrderLists", args, &result) + return +}