You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
2.3 KiB
109 lines
2.3 KiB
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
|
|
}
|