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.
service/supply/interface/afterService.go

80 lines
2.9 KiB

2 years ago
package _interface
import (
"context"
)
const (
AfterServiceCanApplyTrue = 1 // 可申请
AfterServiceCanApplyFalse = 2 // 不可申请
AfterServiceNeedPictureTrue = 1 // 需要上传
AfterServiceNeedPictureFalse = 2 // 不需要上传
)
2 years ago
type AfterServiceInterface interface {
// Can 获取是否可发起售后
Can(ctx context.Context, args ArgsAfterServiceCan, reply *ReplyAfterServiceCan) error
2 years ago
// Reason 获取售后原因
Reason(ctx context.Context, args ArgsAfterServiceReason, reply *[]ReplyAfterServiceReason) error
2 years ago
// Apply @Title 发起售后
Apply(ctx context.Context, args ArgsAfterServiceApply, sourceAfsSn *string) error
2 years ago
// LogisticsAddress @Title 寄回地址
LogisticsAddress(ctx context.Context, afterServiceSn string, reply *ReplyAfterServiceLogisticsAddress) error
// BackLogisticsBill @Title 回传物流信息
BackLogisticsBill(ctx context.Context, args ArgsAfterServiceBackLogisticsBill, reply *int) error
// Cancel @Title 取消售后
Cancel(ctx context.Context, afterServiceSn string, reply *int) error
}
type ArgsAfterServiceCan struct {
2 years ago
OrderSn string // 订单编号
SkuId string // skuId
}
type ReplyAfterServiceCan struct {
CanApply uint `json:"canApply"` // 是否可申请售后 1=可申请 2=不可申请
SkuId string `json:"skuId"` // skuId
AppliedNum uint `json:"appliedNum"` // 已申请售后商品数量
CannotApplyTip string `json:"cannotApplyTip"` // 不可申请原因
Types []AfterServiceType `json:"types"`
}
type AfterServiceType struct {
TypeId string `json:"type"` // 类型
2 years ago
TypeName string `json:"typeName"` // 类型名称
}
type ArgsAfterServiceReason struct {
OrderSn string // 订单编号
SkuId string // skuId
TypeId string // 售后类型
2 years ago
}
type ReplyAfterServiceReason struct {
ReasonCode string `json:"reasonCode"` // 售后原因编码
ReasonName string `json:"reasonName"` // 售后原因描述
NeedPicture uint `json:"needPicture"` // 是否需要上传图片 1=需要上传 2=不需要上传
}
type ArgsAfterServiceApply struct {
2 years ago
TypeId string // 售后类型
TypeName string // 售后名称
ReasonCode string // 售后原因编码
ReasonName string // 售后原因描述
AfsSn string // 渠道售后单号
OrderSn string // 订单编号
SkuId string // skuId
Pictures []string // 图片地址数组
Quantity uint // 售后申请数量
2 years ago
}
type ReplyAfterServiceLogisticsAddress struct {
Name string `json:"name"` // 姓名
Mobile string `json:"mobile"` // 手机号
ZipCode string `json:"zipCode"` // 邮编
Address string `json:"address"` // 地址
}
type ArgsAfterServiceBackLogisticsBill struct {
AfterServiceSn string // 售后单号
LogisticsCompany string // 物流公司
WaybillCode string // 运单号
SendGoodsDate int64 // 运单发货日期
}