refund

package
v0.1.211 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 0 Imported by: 0

README

refund

售后类接口 售后列表 售后详情

Documentation

Index

Constants

View Source
const (
	SHIP_NEEDLESS = iota // 无需寄回
	SHIP_NEEDED          // 需寄回
)
View Source
const (
	URL_REFUND_DETAIL    = "/ark/open_api/v0/refund/{returns_id}" // 售后详情路由
	METHOD_REFUND_DETAIL = "afterSale.getAfterSaleDetail"
)
View Source
const (
	RECEIVE_1 ReceiveAbnormalType = iota + 1
	RECEIVE_2
	RECEIVE_4 = 2 * iota
	RECEIVE_5
	RECEIVE_8 = 2 * iota
	RECEIVE_9
)
View Source
const (
	URL_REFUND_LIST    = "/ark/open_api/v0/refund/list" // 售后列表路由
	METHOD_REFUND_LIST = "afterSale.listAfterSaleApi"
)
View Source
const (
	URL_REFUND_AUDIT = "/ark/open_api/v0/refund/audit"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Audit

type Audit struct {
	ReturnsId          string        `json:"returns_id,omitempty"`
	OperateTime        int64         `json:"operate_time,omitempty"`
	AuditResult        int           `json:"audit_result,omitempty"`
	AuditDescription   string        `json:"audit_description,omitempty"`
	RejectReason       int           `json:"reject_reason,omitempty"`
	AutoRefundDisabled bool          `json:"auto_refund_disabled,omitempty"`
	ShipNeeded         int           `json:"ship_needed,omitempty"`
	ReceiverInfo       *ReceiverInfo `json:"receiver_info,omitempty"`
}

type IsShipNeeded

type IsShipNeeded bool

IsShipNeeded 是否寄回

func (IsShipNeeded) Bool added in v0.0.11

func (i IsShipNeeded) Bool() bool

Bool ...

type ReceiveAbnormalType

type ReceiveAbnormalType uint

ReceiveAbnormalType 收货异常类型

func (ReceiveAbnormalType) Uint added in v0.0.11

func (r ReceiveAbnormalType) Uint() uint

Uint ...

type ReceiverInfo

type ReceiverInfo struct {
	Code     string `json:"code,omitempty"`
	Country  string `json:"country,omitempty"`
	Province string `json:"province,omitempty"`
	City     string `json:"city,omitempty"`
	District string `json:"district,omitempty"`
	Street   string `json:"street,omitempty"`
}

type RefundStatus

type RefundStatus uint

RefundStatus 退款状态,0:暂未触发退款;108 触发退款;1 退款中;2 退款成功;3 退款失败;101 转帐超时;401 已取消;201 待审核;301 审核通过;302 审核不通过;402 自动关闭

const (
	REFUND_0   RefundStatus = iota // 暂未触发退款
	REFUND_1                       // 退款中
	REFUND_2                       // 退款成功
	REFUND_3                       // 退款失败
	REFUND_101 RefundStatus = 101  // 转账超时
	REFUND_108 RefundStatus = 108  // 触发退款
	REFUND_201 RefundStatus = 201  // 待审核
	REFUND_301 RefundStatus = 301  // 审核通过
	REFUND_302 RefundStatus = 302  // 审核不通过
	REFUND_401 RefundStatus = 401  // 已取消
	REFUND_402 RefundStatus = 402  // 自动关闭
)

func (RefundStatus) Uint added in v0.0.11

func (r RefundStatus) Uint() uint

Uint ...

type ReqDetail added in v0.1.1

type ReqDetail struct {
	AfterSaleId string `json:"afterSaleId" param:"afterSaleId"` // 售后ID
}

ReqDetail 售后详情请求

type ReqList added in v0.1.1

type ReqList struct {
	Status     ReturnStatus `json:"status" param:"status"`         // 售后状态 1:待审核;2:待用户寄回;3:待收货;4:完成;5:取消;6:关闭;9:拒绝;9999:删除,不传默认全部
	PageNo     int          `json:"pageNo" param:"pageNo"`         // 返回页码 默认 1,页码从 1 开始 PS:当前采用分页返回,数量和页数会一起传,如果不传,则采用 默认值
	PageSize   int          `json:"pageSize" param:"pageSize"`     // 返回数量,默认50最大100
	StartTime  int64        `json:"startTime" param:"startTime"`   // 查询时间起点
	EndTime    int64        `json:"endTime" param:"endTime"`       // 查询时间终点
	TimeType   TimeType     `json:"timeType" param:"timeType"`     // 时间类型,1:根据创建时间查询 end-start<=24h;2:根据更新时间查询 end-start<=30min
	UseHasNext bool         `json:"useHasNext" param:"useHasNext"` // 是否返回所有数据,true 不返会total 返回 hasNext = true 表示仍有数据,false 返回total
	ReasonId   string       `json:"reasonId" param:"reasonId"`     // 编号
	ReturnType ReturnType   `json:"returnType" param:"returnType"` // 售后类型 不传/0:全部;1:退货退款;2:换货;3:仅退款(old) 4:仅退款(new) 理论上不会有3出现
}

ReqList 售后列表请求

type ReturnStatus

type ReturnStatus uint

ReturnStatus 售后状态

const (
	RETURN_NONE ReturnStatus = iota // 不传默认,全部
	RETURN_1                        // 待审核
	RETURN_2                        // 待用户寄回
	RETURN_3                        // 待收货
	RETURN_4                        // 完成
	RETURN_5                        // 取消
	RETURN_6                        // 关闭

	RETURN_9                        // 拒绝
	RETURN_9999 ReturnStatus = 9999 // 删除
)

func (ReturnStatus) Uint added in v0.0.11

func (r ReturnStatus) Uint() uint

Uint ...

type ReturnSubStats

type ReturnSubStats uint

ReturnSubStats 售后子状态

const (
	SUB_301 ReturnSubStats = iota + 301 // 待审核
	SUB_302                             // 快递已签收

	SUB_304 // 收获异常
)

func (ReturnSubStats) Uint added in v0.0.11

func (r ReturnSubStats) Uint() uint

Uint ...

type ReturnType

type ReturnType uint

ReturnType 售后类型

const (
	TYPE_NONE ReturnType = iota // 不传/0:全部
	TYPE_1                      // 退货退款
	TYPE_2                      // 换货
	TYPE_3                      // 仅退款(old
	TYPE_4                      // 仅退款(new
)

func (ReturnType) Uint added in v0.0.11

func (r ReturnType) Uint() uint

Uint ...

type RspDetail added in v0.1.1

type RspDetail struct {
	ReturnsId            string              `json:"returnsId" mapstructure:"returnsId"`                       // 售后id
	ReturnType           ReturnType          `json:"returnType" mapstructure:"returnType"`                     // 退货类型 1-退货退款, 2-换货, 3:仅退款(old) 4:仅退款(new) 理论上不会有3出现 -1 - 全部
	ReasonId             string              `json:"reasonId" mapstructure:"reasonId"`                         // 售后原因id
	Reason               string              `json:"reason" mapstructure:"reason"`                             // 售后原因说明
	Status               ReturnStatus        `json:"status" mapstructure:"status"`                             // 售后状态 1:待审核 2:待用户寄回 3:待收货 4:完成 5:取消 6:关闭 9:拒绝 9999:删除
	SubStatus            ReturnSubStats      `json:"subStatus" mapstructure:"subStatus"`                       // 售后子状态 301-待审核 302-快递已签收 304-收货异常
	ReceiveAbnormalType  ReceiveAbnormalType `json:"receiveAbnormalType" mapstructure:"receiveAbnormalType"`   // 收货异常类型
	PackageId            string              `json:"packageId" mapstructure:"packageId"`                       // 包裹id
	ExchangePackageId    string              `json:"exchangePackageId" mapstructure:"exchangePackageId"`       // 换货包裹id
	OrderId              string              `json:"orderId" mapstructure:"orderId"`                           // 订单id
	UserId               string              `json:"userId" mapstructure:"userId"`                             // 用户id
	CreatedAt            int64               `json:"createdAt" mapstructure:"createdAt"`                       // 创建时间
	ReturnExpressNo      string              `json:"returnExpressNo" mapstructure:"returnExpressNo"`           // 售后包裹快递单号
	ReturnExpressCompany string              `json:"returnExpressCompany" mapstructure:"returnExpressCompany"` // 售后包裹快递公司
	ReturnAddress        string              `json:"returnAddress" mapstructure:"returnAddress"`               // 售后寄回地址
	ShipNeeded           IsShipNeeded        `json:"shipNeeded" mapstructure:"shipNeeded"`                     // 是否需要寄回 0-否 1-是 -1-全部
	Refunded             bool                `json:"refunded" mapstructure:"refunded"`                         // 是否已退款
	RefundStatus         RefundStatus        `json:"refundStatus" mapstructure:"refundStatus"`                 // 退款状态,0:暂未触发退款;108 触发退款;1 退款中;2 退款成功;3 退款失败;101 转帐超时;401 已取消;201 待审核;301 审核通过;302 审核不通过;402 自动关闭
	AutoReceiveDeadline  int64               `json:"autoReceiveDeadline" mapstructure:"autoReceiveDeadline"`   // 超时自动确认收货的时间
	UseFastRefund        bool                `json:"useFastRefund" mapstructure:"useFastRefund"`               // 是否急速退款
	ProofPhotos          []string            `json:"proofPhotos" mapstructure:"proofPhotos"`                   // 照片凭证
	Desc                 string              `json:"desc" mapstructure:"desc"`                                 // 描述
	Note                 string              `json:"note" mapstructure:"note"`                                 // 备注
	RefundTime           int64               `json:"refundTime" mapstructure:"refundTime"`                     // 退款时间
	FillExpressTime      int64               `json:"fillExpressTime" mapstructure:"fillExpressTime"`           // 填写退货快递单时间
	ExpressSignTime      int64               `json:"expressSignTime" mapstructure:"expressSignTime"`           // 退货快递签收时间
	Items                []struct {
		ItemId            string `json:"itemId" mapstructure:"itemId"`                       // 商品id
		ItemName          string `json:"itemName" mapstructure:"itemName"`                   // 商品名称
		Image             string `json:"image" mapstructure:"image"`                         // 商品主图
		Price             int    `json:"price" mapstructure:"price"`                         // 商品价格
		BoughtCount       int    `json:"boughtCount" mapstructure:"boughtCount"`             // 购买数量
		AppliedCount      int    `json:"appliedCount" mapstructure:"appliedCount"`           // 申请退货数量
		ReturnedCount     int    `json:"returnedCount" mapstructure:"returnedCount"`         // 实际收货数量
		RefundedCount     int    `json:"refundedCount" mapstructure:"refundedCount"`         // 退款数量
		ReturnPrice       int    `json:"returnPrice" mapstructure:"returnPrice"`             // 实际退款
		ExchangeItemId    string `json:"exchangeItemId" mapstructure:"exchangeItemId"`       // 换货商品id
		ExchangeItemName  string `json:"exchangeItemName" mapstructure:"exchangeItemName"`   // 换货商品名称
		ExchangeItemImage string `json:"exchangeItemImage" mapstructure:"exchangeItemImage"` // 换货商品主图
		Skucode           string `json:"skucode" mapstructure:"skucode"`                     // 商品代码
		Barcode           string `json:"barcode" mapstructure:"barcode"`                     // 商品条码
		ExchangeSkucode   string `json:"exchangeSkucode" mapstructure:"exchangeSkucode"`     // 换货商品代码
		ExchangeBarcode   string `json:"exchangeBarcode" mapstructure:"exchangeBarcode"`     // 换货商品条码
	} `json:"items" mapstructure:"items"` // 售后商品
	RefundFee                int    `json:"refundFee" mapstructure:"refundFee"`                               // 退款金额,单位元
	ReturnExpressRefundable  bool   `json:"returnExpressRefundable" mapstructure:"returnExpressRefundable"`   // 退货运费是否可退
	ReturnExpressRefunded    bool   `json:"returnExpressRefunded" mapstructure:"returnExpressRefunded"`       // 退货运费是否已退
	ExpectRefundFee          int    `json:"expectRefundFee" mapstructure:"expectRefundFee"`                   // 期望退款金额,单位元,目前是售后单包含的商品总金额
	UpdatedAt                int64  `json:"updatedAt" mapstructure:"updatedAt"`                               // 更新时间
	ReturnExpressCompanyCode string `json:"returnExpressCompanyCode" mapstructure:"returnExpressCompanyCode"` // 退货快递公司编号
}

RspDetail 售后详情返回

type RspList added in v0.1.1

type RspList struct {
	Total               int  `json:"total" mapstructure:"total"`       // 查询到的总数,useHasNext=true时为0
	PageNo              int  `json:"pageNo" mapstructure:"pageNo"`     // 当前页数
	PageSize            int  `json:"pageSize" mapstructure:"pageSize"` // 页大小
	HaxNext             bool `json:"haxNext" mapstructure:"haxNext"`   // 是否有下一页
	SimpleAfterSaleList []struct {
		ReturnsId                string              `json:"returnsId" mapstructure:"returnsId"`                               // 售后ID
		ReturnType               int                 `json:"returnType" mapstructure:"returnType"`                             // 售后类型
		ReasonId                 int                 `json:"reasonId" mapstructure:"reasonId"`                                 // 售后原因ID
		Reason                   string              `json:"reason" mapstructure:"reason"`                                     // 售后原因
		Status                   ReturnStatus        `json:"status" mapstructure:"status"`                                     // 售后状态 1:待审核 2:待用户寄回 3:待收货 4:完成 5:取消 6:关闭 9:拒绝 9999:删除
		SubStatus                ReturnSubStats      `json:"subStatus" mapstructure:"subStatus"`                               // 售后子状态 301-待审核 302-快递已签收 304-收货异常
		ReceiveAbnormalType      ReceiveAbnormalType `json:"receiveAbnormalType" mapstructure:"receiveAbnormalType"`           // 收货异常类型
		PackageId                string              `json:"packageId" mapstructure:"packageId"`                               // 包裹ID
		ExchangePackageId        string              `json:"exchangePackageId" mapstructure:"exchangePackageId"`               // 换货包裹ID
		OrderId                  string              `json:"orderId" mapstructure:"orderId"`                                   // 订单ID
		UserId                   string              `json:"userId" mapstructure:"userId"`                                     // 用户ID
		CreatedTime              int64               `json:"createdTime" mapstructure:"createdTime"`                           // 售后创建时间戳(毫秒)
		ReturnExpressNo          string              `json:"returnExpressNo" mapstructure:"returnExpressNo"`                   // 售后快递单号
		ReturnExpressCompany     string              `json:"returnExpressCompany" mapstructure:"returnExpressCompany"`         // 售后快递公司
		ReturnAddress            string              `json:"returnAddress" mapstructure:"returnAddress"`                       // 售后退货地址
		ShipNeeded               IsShipNeeded        `json:"shipNeeded" mapstructure:"shipNeeded"`                             // 是否需要寄回 1-需要 0-不需要
		Refunded                 bool                `json:"refunded" mapstructure:"refunded"`                                 // 是否已退款
		RefundStatus             RefundStatus        `json:"refundStatus" mapstructure:"refundStatus"`                         // 退款状态 108触发退款 1退款中 3退款失败 2退款成功 401已取消 101已创建 201待审核 301审核通过 302审核不通过 402自动关闭
		AutoReceiveDeadline      int64               `json:"autoReceiveDeadline" mapstructure:"autoReceiveDeadline"`           // 自动确认收货时间
		UseFastRefund            bool                `json:"useFastRefund" mapstructure:"useFastRefund"`                       // 是否急速退款
		UpdateTime               int64               `json:"updateTime" mapstructure:"updateTime"`                             // 售后更新时间戳(毫秒)
		ReturnExpressCompanyCode string              `json:"returnExpressCompanyCode" mapstructure:"returnExpressCompanyCode"` // 退货快递公司编号
	} `json:"simpleAfterSaleList" mapstructure:"simpleAfterSaleList"` // 售后信息列表
	MaxPageNo int `json:"maxPageNo" mapstructure:"maxPageNo"` // 最大页码数
}

RspList 售后列表返回

type TimeType added in v0.1.1

type TimeType int

TimeType startTime/endTime对应的时间类型

const (
	CREATED TimeType = iota + 1 // 创建时间
	UPDATED                     // 更新时间
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL