94 lines
4.6 KiB
Go
94 lines
4.6 KiB
Go
package tao_vegetable
|
|
|
|
// PublicModel 公共参数
|
|
type PublicModel struct {
|
|
Method string `json:"method"` // api接口
|
|
AppKey string `json:"app_key"` // appKey
|
|
Session string `json:"session"` // 门店授权token
|
|
Timestamp string `json:"timestamp"` // 时间戳 时间格式
|
|
V string `json:"v"` // 版本
|
|
SignMethod string `json:"sign_method"` // 签名方式
|
|
Sign string `json:"sign"` // 签名
|
|
Format string `json:"format"` // 响应格式
|
|
Simplify bool `json:"simplify"` // 是否精简json
|
|
CustomerId bool `json:"customer_id"` // 三方对接过程中,业务自定义路由参数,更多在奇门仓储等场景中使用
|
|
}
|
|
|
|
// CallbackOrder 正新订单消息通知
|
|
type CallbackOrder struct {
|
|
//PublicModel
|
|
StoreId string `json:"store_id"` // 门店id
|
|
OrderStatus string `json:"order_status"` // 订单状态
|
|
MerchantCode string `json:"merchant_code"` // 商家编码
|
|
BizOrderId int64 `json:"biz_order_id"` // 订单号
|
|
}
|
|
|
|
// OnSaleCancel 售中订单取消回调
|
|
type OnSaleCancel struct {
|
|
//PublicModel
|
|
PartCancelRequest PartCancelRequest `json:"partCancelRequest"` // 取消子单列表
|
|
}
|
|
|
|
type PartCancelRequest struct {
|
|
IdempotentId string `json:"idempotentId"` // 发起订单取消幂等键
|
|
MerchantCode string `json:"merchantCode"` // 商户id
|
|
SubOrders []CancelSubOrder `json:"subOrders"` // 取消子单列表
|
|
StoreId string `json:"storeId"` // 门店id
|
|
BizOrderId int64 `json:"bizOrderId"` // 主订单号
|
|
}
|
|
|
|
type CancelSubOrder struct {
|
|
CancelSaleQuantity string `json:"cancelSaleQuantity"` // 销售单位取消数量
|
|
BizSubOrderId int64 `json:"bizSubOrderId"` // 要取消的子订单号
|
|
CancelStockQuantity string `json:"cancelStockQuantity"` // 库存单位取消数量
|
|
}
|
|
|
|
// UserApplyRefundCallBack 用户申请售后消息通知
|
|
type UserApplyRefundCallBack struct {
|
|
//PublicModel
|
|
RefundFee int64 `json:"refundFee"` // 申请退款金额(包含退运费), 分
|
|
MerchantCode string `json:"merchantCode"` // 商家编码
|
|
RefundReason string `json:"refundReason"` // 退款原因
|
|
SubRefundOrders []SubRefundOrdersList `json:"subRefundOrders"` // 逆向子单列表
|
|
StoreId string `json:"storeId"` // 商家经营店ID
|
|
RefundDeliveryFee int64 `json:"refundDeliveryFee"` // 退运费, 分
|
|
RefundPictures string `json:"refundPictures"` // 售后图片链接
|
|
BizRefundId string `json:"bizRefundId"` // 翱象退款单ID
|
|
OutOrderId string `json:"outOrderId"` // 渠道订单ID
|
|
RefundPackageFee int64 `json:"refundPackageFee"` // 退包装费,分
|
|
OrderFrom int64 `json:"orderFrom"` // 订单来源:如 2=美团 / 3=饿了么 / 4=淘鲜达
|
|
RefundId string `json:"refundId"` // 渠道退款单ID, 幂等键
|
|
Remarks string `json:"remarks"` // 备注
|
|
}
|
|
|
|
type SubRefundOrdersList struct {
|
|
RefundFee int64 `json:"refundFee"` // 子单退款金额, 分
|
|
MaxRefundFee int64 `json:"maxRefundFee"` // 子单最大可退款金额, 分
|
|
OutSubOrderId string `json:"outSubOrderId"` // 渠道子订单ID
|
|
RefundAmount int64 `json:"refundAmount"` // 子单退货数量(淘鲜达不用填)
|
|
}
|
|
|
|
// UserCancelRefundApply 用户取消售后申请
|
|
type UserCancelRefundApply struct {
|
|
//PublicModel
|
|
MerchantCode string `json:"merchantCode"` // 商家编码
|
|
BizRefundId string `json:"bizRefundId"` // 翱象退款单ID
|
|
OutOrderId string `json:"outOrderId"` // 渠道订单ID
|
|
OrderFrom int `json:"orderFrom"` // 渠道来源
|
|
StoreId string `json:"storeId"` // 商家经营店ID
|
|
RefundId string `json:"refundId"` // 渠道退款单ID, 幂等键
|
|
}
|
|
|
|
// RefundOrderFinish 逆向订单完成回调(售后完成)
|
|
type RefundOrderFinish struct {
|
|
//PublicModel
|
|
StoreId string `json:"store_id"` // 门店编码
|
|
OrderStatus string `json:"order_status"` // 退款单状态
|
|
OutSubOrderId string `json:"out_sub_order_id"` // 外部子单号
|
|
ShopId string `json:"shop_id"` // 渠道店编码
|
|
MerchantCode string `json:"merchant_code"` // 商家编码
|
|
OutMainRefundId string `json:"out_main_refund_id"` // 外部退款单号
|
|
OrderFrom string `json:"order_from"` // 订单来源渠道
|
|
BizSubRefundId string `json:"biz_sub_refund_id"` // 退款业务子单号
|
|
}
|