diff --git a/supply/interface/afterService.go b/supply/interface/afterService.go index 58a642a..04c4194 100644 --- a/supply/interface/afterService.go +++ b/supply/interface/afterService.go @@ -4,9 +4,14 @@ import ( "context" ) +const ( + AfterServiceCanApplyFalse = 1 // 不可申请 + AfterServiceCanApplyTrue = 2 // 可申请 +) + type AfterServiceInterface interface { - // Type 获取可发起的售后类型 - Type(ctx context.Context, args ArgsAfterServiceType, reply *[]ReplyAfterServiceType) error + // Can 获取是否可发起售后 + Can(ctx context.Context, args ArgsAfterServiceCan, reply *ReplyAfterServiceCan) error // Reason 获取售后原因 Reason(ctx context.Context, args ArgsAfterServiceReason, reply *ReplyAfterServiceReason) error // Apply @Title 发起售后 @@ -18,19 +23,26 @@ type AfterServiceInterface interface { // Cancel @Title 取消售后 Cancel(ctx context.Context, afterServiceSn string, reply *int) error } -type ArgsAfterServiceType struct { +type ArgsAfterServiceCan struct { OrderSn string // 订单编号 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 string `json:"type"` // 类型 + TypeId string `json:"type"` // 类型 TypeName string `json:"typeName"` // 类型名称 } type ArgsAfterServiceReason struct { OrderSn string // 订单编号 SkuId string // skuId - Type string // 售后类型 + TypeId string // 售后类型 } type ReplyAfterServiceReason struct { ReasonCode string `json:"reasonCode"` // 售后原因编码