From db843977f83aec4ad79f15d420e9e75f355dd32d Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 19 Oct 2022 10:00:38 +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/afterService.go | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/supply/afterService.go b/supply/afterService.go index 4fec33a..55fe83e 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -4,6 +4,7 @@ import ( "context" "git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/lib/bean" + "github.com/shopspring/decimal" ) const ( @@ -107,3 +108,43 @@ func (a *afterService) Reject(ctx context.Context, args ArgsAfterServiceReject) err = xClient.Call(ctx, "Reject", args, &reply) return } + +type ReplyAfterServiceInfo struct { + Id uint `json:"id"` + OrderStatus uint `json:"orderStatus"` + PayTime int64 `json:"payTime"` + FinishAt int64 `json:"finishAt"` + OrderSubSn string `json:"orderSubSn"` + Source string `json:"source"` + Customer string `json:"customer"` + OrderFee decimal.Decimal `json:"orderFee"` + FreightFee decimal.Decimal `json:"freightFee"` + Sku AfterServiceSku `json:"sku"` + Packages []RetailOrderPackage `json:"packages"` +} + +type RetailOrderPackage struct { + LogisticsName string `json:"logisticsName"` + WaybillCode string `json:"waybillCode"` +} + +type AfterServiceSku struct { + Name string `json:"name"` + SkuId uint `json:"skuId"` + SupplySkuId uint `json:"supplySkuId"` + SupplyPrice decimal.Decimal `json:"supplyPrice"` + Rate decimal.Decimal `json:"rate"` + AdjustType uint `json:"adjustType"` + Price decimal.Decimal `json:"price"` + Quantity uint `json:"quantity"` +} + +// Info @Title 零售售后详情 +func (a *afterService) Info(ctx context.Context, afsId uint) (reply ReplyAfterServiceInfo, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return ReplyAfterServiceInfo{}, err + } + err = xClient.Call(ctx, "Info", afsId, &reply) + return +}