- 美团外卖售后单中尽量使用refund_id参数(如果有值的话)

This commit is contained in:
gazebo
2019-05-28 17:14:53 +08:00
parent 62f32c4f11
commit fbefdfd5cf
2 changed files with 4 additions and 2 deletions

View File

@@ -121,7 +121,6 @@ func (c *PurchaseHandler) onAfsOrderMsg(msg *mtwmapi.CallbackMsg) (retVal *mtwma
func (c *PurchaseHandler) callbackAfsMsg2Status(msg *mtwmapi.CallbackMsg) (orderStatus *model.OrderStatus) {
refundData := msg.Data.(*mtwmapi.CallbackRefundInfo)
orderStatus = &model.OrderStatus{
// VendorOrderID: utils.Int64ToStr(refundData.OrderID),
VendorID: model.VendorIDMTWM,
OrderType: model.OrderTypeAfsOrder,
RefVendorOrderID: utils.Int64ToStr(refundData.OrderID),
@@ -131,6 +130,9 @@ func (c *PurchaseHandler) callbackAfsMsg2Status(msg *mtwmapi.CallbackMsg) (order
StatusTime: utils.Timestamp2Time(refundData.Timestamp),
Remark: refundData.Reason,
}
if refundData.RefundID > 0 {
orderStatus.VendorOrderID = utils.Int64ToStr(refundData.RefundID)
}
return orderStatus
}