diff --git a/supply/afterService.go b/supply/afterService.go index e21b5e2..92edd68 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -109,42 +109,34 @@ func (a *afterService) Reject(ctx context.Context, args ArgsAfterServiceReject) 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, afsSn string) (reply ReplyAfterServiceInfo, err error) { +type ReplyAfterServiceDetail struct { + Id uint `json:"id"` + AfsSn string `json:"afsSn"` + Status uint `json:"status"` + Result string `json:"result"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` + SkuName string `json:"skuName"` + ImgUrl string `json:"imgUrl"` + SkuId uint `json:"skuId"` + SupplySkuId uint `json:"supplySkuId"` + Price decimal.Decimal `json:"price"` + SupplyPrice decimal.Decimal `json:"supplyPrice"` + Quantity uint `json:"quantity"` + HopeTypeName string `json:"hopeTypeName"` + TypeReasonName string `json:"typeReasonName"` + Imgs []string `json:"imgs"` + LogisticsCompany string `json:"logisticsCompany"` + WaybillCode string `json:"waybillCode"` + SendAt int64 `json:"sendAt"` +} + +// Detail @Title 售后详情 +func (a *afterService) Detail(ctx context.Context, afsSn string) (reply ReplyAfterServiceDetail, err error) { xClient, err := client.GetClient(a) if err != nil { - return ReplyAfterServiceInfo{}, err + return } - err = xClient.Call(ctx, "Info", afsSn, &reply) + err = xClient.Call(ctx, "Detail", afsSn, &reply) return }