1
This commit is contained in:
93
platformapi/tao_vegetable/order_model.go
Normal file
93
platformapi/tao_vegetable/order_model.go
Normal file
@@ -0,0 +1,93 @@
|
||||
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
|
||||
MerchantCode string `json:"merchant_code"` // 商家编码
|
||||
StoreId string `json:"store_id"` // 门店id
|
||||
BizOrderId int64 `json:"biz_order_id"` // 订单号
|
||||
OrderStatus string `json:"order_status"` // 订单状态
|
||||
}
|
||||
|
||||
// OnSaleCancel 售中订单取消回调
|
||||
type OnSaleCancel struct {
|
||||
PublicModel
|
||||
PartCancelRequest PartCancelRequest `json:"partCancelRequest"` // 取消子单列表
|
||||
IdempotentId string `json:"idempotentId"` // 发起订单取消幂等键
|
||||
BizOrderId int64 `json:"bizOrderId"` // 主订单号
|
||||
StoreId string `json:"storeId"` // 门店id
|
||||
MerchantCode string `json:"merchantCode"` // 商户id
|
||||
}
|
||||
|
||||
type PartCancelRequest struct {
|
||||
SubOrders []CancelSubOrder `json:"subOrders"` // 取消子单列表
|
||||
}
|
||||
|
||||
type CancelSubOrder struct {
|
||||
BizSubOrderId int64 `json:"bizSubOrderId"` // 要取消的子订单号
|
||||
CancelStockQuantity string `json:"cancelStockQuantity"` // 库存单位取消数量
|
||||
CancelSaleQuantity string `json:"cancelSaleQuantity"` // 销售单位取消数量
|
||||
}
|
||||
|
||||
// UserApplyRefundCallBack 用户申请售后消息通知
|
||||
type UserApplyRefundCallBack struct {
|
||||
PublicModel
|
||||
BizRefundId string `json:"bizRefundId"` // 翱象退款单ID
|
||||
RefundId string `json:"refundId"` // 渠道退款单ID, 幂等键
|
||||
OutOrderId string `json:"outOrderId"` // 渠道订单ID
|
||||
MerchantCode string `json:"merchantCode"` // 商家编码
|
||||
StoreId string `json:"storeId"` // 商家经营店ID
|
||||
OrderFrom int64 `json:"orderFrom"` // 订单来源:如 2=美团 / 3=饿了么 / 4=淘鲜达
|
||||
RefundFee int64 `json:"refundFee"` // 申请退款金额(包含退运费), 分
|
||||
RefundDeliveryFee int64 `json:"refundDeliveryFee"` // 退运费, 分
|
||||
RefundPackageFee int64 `json:"refundPackageFee"` // 退包装费,分
|
||||
RefundReason string `json:"refundReason"` // 退款原因
|
||||
RefundPictures string `json:"refundPictures"` // 售后图片链接
|
||||
Remarks string `json:"remarks"` // 备注
|
||||
SubRefundOrders []SubRefundOrdersList `json:"subRefundOrders"` // 逆向子单列表
|
||||
}
|
||||
|
||||
type SubRefundOrdersList struct {
|
||||
RefundFee int64 `json:"refundFee"` // 子单退款金额, 分
|
||||
OutSubOrderId string `json:"outSubOrderId"` // 渠道子订单ID
|
||||
MaxRefundFee int64 `json:"maxRefundFee"` // 子单最大可退款金额, 分
|
||||
RefundAmount int64 `json:"refundAmount"` // 子单退货数量(淘鲜达不用填)
|
||||
}
|
||||
|
||||
// UserCancelRefundApply 用户取消售后申请
|
||||
type UserCancelRefundApply struct {
|
||||
PublicModel
|
||||
RefundId string `json:"refundId"` // 渠道退款单ID, 幂等键
|
||||
BizRefundId string `json:"bizRefundId"` // 翱象退款单ID
|
||||
OutOrderId string `json:"outOrderId"` // 渠道订单ID
|
||||
OrderFrom int64 `json:"orderFrom"` // 渠道来源
|
||||
MerchantCode int64 `json:"merchantCode"` // 商家编码
|
||||
StoreId int64 `json:"storeId"` // 商家经营店ID
|
||||
}
|
||||
|
||||
// RefundOrderFinish 逆向订单完成回调(售后完成)
|
||||
type RefundOrderFinish struct {
|
||||
PublicModel
|
||||
StoreId string `json:"store_id"` // 门店编码
|
||||
OrderStatus string `json:"order_status"` // 退款单状态
|
||||
OutSubOrderId string `json:"out_sub_order_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"` // 退款业务子单号
|
||||
ShopId string `json:"shop_id"` // 渠道店编码
|
||||
}
|
||||
Reference in New Issue
Block a user