diff --git a/supply/afterService.go b/supply/afterService.go index 6ca3af4..fd07646 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -58,6 +58,49 @@ func (a *afterService) RetailAfsHistory(ctx context.Context, args ArgsRetailHist return } +type ArgsAfsLists struct { + Search AfsListSearch `json:"search"` + Page bean.Page `json:"page"` +} + +type AfsListSearch struct { + Status uint `json:"status"` + AfsSn string `json:"afsSn"` + OrderSubSn string `json:"orderSubSn"` + CreatedStartDate string `json:"createdStartAt"` + CreatedEndDate string `json:"createdEndAt"` +} + +type ReplyAfsLists struct { + Lists []AfsItem `json:"lists"` + Total int64 `json:"total"` +} + +type AfsItem struct { + Id uint `json:"id"` + AfsSn string `json:"afsSn"` + OrderSubSn string `json:"orderSubSn"` + SourceId uint `json:"sourceId"` + SourceSkuId string `json:"sourceSkuId"` + SkuName string `json:"skuName"` + Quantity uint `json:"quantity"` + Status uint `json:"status"` + Result string `json:"result"` + Price decimal.Decimal `json:"price"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` +} + +// Lists @Title 售后列表 +func (a *afterService) Lists(ctx context.Context, args ArgsAfsLists) (reply ReplyAfsLists, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return ReplyAfsLists{}, err + } + err = xClient.Call(ctx, "Lists", args, &reply) + return +} + type ArgsAfterServiceDeliver struct { SourceAfsSn string `json:"sourceAfsSn"` SourceSkuId string `json:"sourceSkuId"` @@ -223,3 +266,28 @@ func (a *afterService) LogisticsAddress(ctx context.Context, afsSn string) (repl err = xClient.Call(ctx, "LogisticsAddress", afsSn, &reply) return } + +type ReplyAfsInfoById struct { + Id uint `json:"id"` + AfsSn string `json:"afsSn"` + SourceAfsSn string `json:"sourceAfsSn"` + SkuId uint `json:"skuId"` + SourceSkuId string `json:"sourceSkuId"` + SourceId uint `json:"sourceId"` + OrderSubSn string `json:"orderSn"` + SourceOrderSn string `json:"SourceOrderSn"` + OrderFee decimal.Decimal `json:"orderFee"` + SourceOrderFee decimal.Decimal `json:"sourceOrderFee"` + FreightFee decimal.Decimal `json:"freightFee"` + ApproveNotes string `json:"approveNotes"` +} + +// FindByAfsId @Title 获取售后信息 +func (a *afterService) FindByAfsId(ctx context.Context, afsId uint) (reply ReplyAfsInfoById, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(ctx, "FindByAfsId", afsId, &reply) + return +}