This commit is contained in:
邹宗楠
2024-08-01 15:21:32 +08:00
parent 757573973f
commit 3d5ac6505c
5 changed files with 88 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ import (
const (
CmdOrderCreate = "order.create"
CmdOrderDeliveryStatus = "order.deliveryStatus.push"
CmdOrderPartRefund = "order.partrefund.push" // 售前只能是商户发起 售后是用户, 你看是由谁发起的就可以知道,来自惠焕(部分退款)
CmdOrderPartRefund = "order.partrefund.push" // 售前只能是商户发起 售后是用户, 你看是由谁发起的就可以知道,来自惠焕(部分退款,饿百废弃了)
CmdOrderReversePush = "order.reverse.push" // 订单逆向消息推送
CmdOrderStatus = "order.status.push"
CmdOrderUserCancel = "order.user.cancel"
@@ -80,6 +80,28 @@ type CBPartRefundInfo struct {
RefundPrice int64 `json:"refund_price"`
}
type CBOrderReversePush struct {
EventId string `json:"event_id"` // 操作事件全局唯一事件
PlatformShopId int `json:"platform_shop_id"` // 平台门店ID
OrderId string `json:"order_id"` // 订单ID
RefundOrderId int64 `json:"refund_order_id"` // 逆向单号
CurReverseEvent struct {
EventId string `json:"event_id"` // 操作事件全局唯一事件
ImageList []string `json:"image_list"` // 操作凭证列表
LastRefundStatus int `json:"last_refund_status"` // 逆向单操作前的退货状态0-无效状态1001-买家已申请退货等待审批处理1002-商家拒绝退货申请1003-退货仲裁已发起客服介入中1004-已同意退货等待发货1005-已发货等待卖家确认收货1006-已收到货,并同意退款, 1007-未收到货不同意退款1008-退货关闭
LastReturnGoodsStatus int `json:"last_return_goods_status"` // 逆向单操作前的逆向单状态0-初始化10-申请20-拒绝30-仲裁40-关闭50-成功60-失败
OccurTime int64 `json:"occur_time"` // 逆向单操作事件发生时间 单位:毫秒
OperatorRole int `json:"operator_role"` // 逆向单操作者角色10 用户 ,20商户,30客服 ,25 API商家代客发起,40系统
OrderId string `json:"order_id"` // 订单ID
ReasonCode int `json:"reason_code"` // 逆向单操作原因对应code具体原因枚举详见文档https://open-retail.ele.me/#/guide?topic=ntmt8f
ReasonContent string `json:"reason_content"` // 逆向单操作原因备注内容
RefundOrderId int64 `json:"refund_order_id"` // 逆向单号
RefundReasonDesc string `json:"refund_reason_desc"` // 逆向单操作原因code对应的文案
RefundStatus int `json:"refund_status"` // 即当前的逆向单状态0-初始化10-申请20-拒绝30-仲裁40-关闭50-成功60-失败
ReturnGoodsStatus int `json:"return_goods_status"` // 即当前的退货状态0-无效状态1001-买家已申请退货等待审批处理1002-商家拒绝退货申请1003-退货仲裁已发起客服介入中1004-已同意退货等待发货1005-已发货等待卖家确认收货1006-已收到货,并同意退款, 1007-未收到货不同意退款1008-退货关闭
} `json:"cur_reverse_event"` // 逆向单当前操作信息
}
type CBUserCancelInfo struct {
OrderID int64 `json:"order_id"`
CancelReason string `json:"cancel_reason"`
@@ -226,6 +248,9 @@ func (a *API) GetCallbackMsg(request *http.Request) (msg *CallbackMsg, callbackR
tmpObj = &ImMessageSend{}
case CmdImMessageReadEvent:
tmpObj = &ImMessageRead{}
case CmdOrderReversePush:
var reversePush CBOrderReversePush
tmpObj = &reversePush
}
if tmpObj != nil {
if utils.Map2StructByJson(msg.Body, tmpObj, true) == nil {