From 99098f84cae6061a4fbb8c5f22ce31446142e1e7 Mon Sep 17 00:00:00 2001 From: kanade Date: Sun, 25 Sep 2022 15:57:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=93=81=E7=89=8C=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/interface/afterService.go | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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"` // 售后原因编码