package supplier import ( "git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/lib/bean" "github.com/shopspring/decimal" "golang.org/x/net/context" ) type afs struct { } type ArgsAfsLists struct { Search AfsSearch Page bean.Page } type AfsSearch struct { Status uint AfsSn string OrderSubSn string CreatedStartDate string CreatedEndDate string } type ReplyAfsLists struct { Lists []AfsItem Total int64 } type AfsItem struct { Id uint `json:"id"` AfsSn string `json:"afsSn"` OrderSubSn string `json:"orderSubSn"` SkuName string `json:"skuName"` Quantity uint `json:"quantity"` Status uint `json:"status"` Result string `json:"result"` OrderFee decimal.Decimal `json:"orderFee"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` ReturnAddress []ReturnAddressItem `json:"returnAddress"` } // Lists @Title 售后列表 func (a *afs) Lists(ctx context.Context, args ArgsAfsLists) (reply ReplyAfsLists, err error) { xClient, err := client.GetClient(a) if err != nil { return } err = xClient.Call(ctx, "Lists", args, &reply) return } type ReplyAfsDetail struct { Id uint `json:"id"` AfsSn string `json:"afsSn"` Status uint `json:"status"` ApproveNotes string `json:"approveNotes"` Result string `json:"result"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` SkuName string `json:"skuName"` ImgUrl string `json:"imgUrl"` SkuId uint `json:"skuId"` Price decimal.Decimal `json:"price"` 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"` NewOrderSn string `json:"newOrderSn"` RefundFee decimal.Decimal `json:"refundFee"` PackageSend uint `json:"packageSend"` AfsPackageSend AfsPackageSend `json:"afsPackageSend"` ReturnAddress []ReturnAddressItem `json:"returnAddress"` } type AfsPackageSend struct { Name string `json:"name"` Mobile string `json:"mobile"` LogisticsCompany string `json:"logisticsCompany"` WaybillCode string `json:"waybillCode"` SendGoodsDate int64 `json:"sendGoodsDate"` } // Detail @Title 售后详情 func (a *afs) Detail(ctx context.Context, afsSn uint64) (reply ReplyAfsDetail, err error) { xClient, err := client.GetClient(a) if err != nil { return } err = xClient.Call(ctx, "Detail", afsSn, &reply) return } type ArgsAfsReject struct { AfsSn string `json:"afsSn"` Notes string `json:"notes"` } // Reject @Title 审核驳回 func (a *afs) Reject(ctx context.Context, args ArgsAfsReject) (err error) { xClient, err := client.GetClient(a) if err != nil { return } reply := 0 err = xClient.Call(ctx, "Reject", args, &reply) return } type ArgsAfsDeliver struct { AfsSn string `json:"afsSn"` ReturnAddressId uint `json:"returnAddressId"` Notes string `json:"notes"` } // Deliver @Title 待客户发货 func (a *afs) Deliver(ctx context.Context, args ArgsAfsDeliver) (err error) { xClient, err := client.GetClient(a) if err != nil { return } reply := 0 err = xClient.Call(ctx, "Deliver", args, &reply) return } type ArgsAfsRefund struct { AfsSn string `json:"afsSn"` Notes string `json:"notes"` } // Refund @Title 退款 func (a *afs) Refund(ctx context.Context, args ArgsAfsRefund) (err error) { xClient, err := client.GetClient(a) if err != nil { return } reply := 0 err = xClient.Call(ctx, "Refund", args, &reply) return } type ArgsAfsCompensate struct { AfsSn string `json:"afsSn"` RefundFee decimal.Decimal `json:"refundFee"` Notes string `json:"notes"` } // Compensate @Title 订单赔偿 func (a *afs) Compensate(ctx context.Context, args ArgsAfsCompensate) (err error) { xClient, err := client.GetClient(a) if err != nil { return } reply := 0 err = xClient.Call(ctx, "Compensate", args, &reply) return } type ArgsAfsCompensateSku struct { AfsSn string `json:"afsSn"` Notes string `json:"notes"` } // CompensateSku @Title 直赔商品 func (a *afs) CompensateSku(ctx context.Context, args ArgsAfsCompensateSku) (err error) { xClient, err := client.GetClient(a) if err != nil { return } reply := 0 err = xClient.Call(ctx, "CompensateSku", args, &reply) return } type ArgsAfsReissue struct { AfsSn string `json:"afsSn"` Notes string `json:"notes"` } // Reissue @Title 补发商品 func (a *afs) Reissue(ctx context.Context, args ArgsAfsReissue) (err error) { xClient, err := client.GetClient(a) if err != nil { return } reply := 0 err = xClient.Call(ctx, "Reissue", args, &reply) return }