From c195c6cd1d4beffb55b4f88b36a8baf2e95c5b26 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 7 Dec 2022 15:38:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=94=AE=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/afs.go | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 supplier/afs.go diff --git a/supplier/afs.go b/supplier/afs.go new file mode 100644 index 0000000..87bed24 --- /dev/null +++ b/supplier/afs.go @@ -0,0 +1,108 @@ +package supplier + +import ( + "git.oa00.com/supply-chain/service/client" + "github.com/shopspring/decimal" + "golang.org/x/net/context" +) + +type afs struct { +} + +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 +} From 511392ecc5c6644102727e49b12a3e9537b38975 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 7 Dec 2022 15:41:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/supplier.go b/supplier/supplier.go index 28ed1c9..9b6fc29 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -15,6 +15,7 @@ type Supplier struct { WalletApply supplierWalletApply LogisticsCompany logisticsCompany ReturnAddress returnAddress + Afs afs } type supplier struct { From 1d0c5bfc616bda48563269144c538aa5a91f3938 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 7 Dec 2022 16:25:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/afs.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/supplier/afs.go b/supplier/afs.go index 87bed24..3a4d5f4 100644 --- a/supplier/afs.go +++ b/supplier/afs.go @@ -2,6 +2,7 @@ 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" ) @@ -9,6 +10,47 @@ import ( 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"` + 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 ArgsAfsReject struct { AfsSn string `json:"afsSn"` Notes string `json:"notes"`