|
|
@ -4,9 +4,14 @@ import (
|
|
|
|
"context"
|
|
|
|
"context"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
|
|
|
AfterServiceCanApplyFalse = 1 // 不可申请
|
|
|
|
|
|
|
|
AfterServiceCanApplyTrue = 2 // 可申请
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
type AfterServiceInterface interface {
|
|
|
|
type AfterServiceInterface interface {
|
|
|
|
// Type 获取可发起的售后类型
|
|
|
|
// Can 获取是否可发起售后
|
|
|
|
Type(ctx context.Context, args ArgsAfterServiceType, reply *[]ReplyAfterServiceType) error
|
|
|
|
Can(ctx context.Context, args ArgsAfterServiceCan, reply *ReplyAfterServiceCan) error
|
|
|
|
// Reason 获取售后原因
|
|
|
|
// Reason 获取售后原因
|
|
|
|
Reason(ctx context.Context, args ArgsAfterServiceReason, reply *ReplyAfterServiceReason) error
|
|
|
|
Reason(ctx context.Context, args ArgsAfterServiceReason, reply *ReplyAfterServiceReason) error
|
|
|
|
// Apply @Title 发起售后
|
|
|
|
// Apply @Title 发起售后
|
|
|
@ -18,19 +23,26 @@ type AfterServiceInterface interface {
|
|
|
|
// Cancel @Title 取消售后
|
|
|
|
// Cancel @Title 取消售后
|
|
|
|
Cancel(ctx context.Context, afterServiceSn string, reply *int) error
|
|
|
|
Cancel(ctx context.Context, afterServiceSn string, reply *int) error
|
|
|
|
}
|
|
|
|
}
|
|
|
|
type ArgsAfterServiceType struct {
|
|
|
|
type ArgsAfterServiceCan struct {
|
|
|
|
OrderSn string // 订单编号
|
|
|
|
OrderSn string // 订单编号
|
|
|
|
SkuId string // skuId
|
|
|
|
SkuId string // skuId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReplyAfterServiceCan struct {
|
|
|
|
|
|
|
|
CanApply uint `json:"canApply"` // 是否可申请售后 0=不可申请 1=可申请
|
|
|
|
|
|
|
|
SkuId string `json:"skuId"` // skuId
|
|
|
|
|
|
|
|
AppliedNum uint `json:"appliedNum"` // 已申请售后商品数量
|
|
|
|
|
|
|
|
CannotApplyTip string `json:"cannotApplyTip"` // 不可申请原因
|
|
|
|
|
|
|
|
Types []ReplyAfterServiceType `json:"types"`
|
|
|
|
|
|
|
|
}
|
|
|
|
type ReplyAfterServiceType struct {
|
|
|
|
type ReplyAfterServiceType struct {
|
|
|
|
Type string `json:"type"` // 类型
|
|
|
|
TypeId string `json:"type"` // 类型
|
|
|
|
TypeName string `json:"typeName"` // 类型名称
|
|
|
|
TypeName string `json:"typeName"` // 类型名称
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type ArgsAfterServiceReason struct {
|
|
|
|
type ArgsAfterServiceReason struct {
|
|
|
|
OrderSn string // 订单编号
|
|
|
|
OrderSn string // 订单编号
|
|
|
|
SkuId string // skuId
|
|
|
|
SkuId string // skuId
|
|
|
|
Type string // 售后类型
|
|
|
|
TypeId string // 售后类型
|
|
|
|
}
|
|
|
|
}
|
|
|
|
type ReplyAfterServiceReason struct {
|
|
|
|
type ReplyAfterServiceReason struct {
|
|
|
|
ReasonCode string `json:"reasonCode"` // 售后原因编码
|
|
|
|
ReasonCode string `json:"reasonCode"` // 售后原因编码
|
|
|
|