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 +}