From fbefdfd5cf921cc5c2fc336faf71f25590e82043 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 28 May 2019 17:14:53 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E7=BE=8E=E5=9B=A2=E5=A4=96=E5=8D=96?= =?UTF-8?q?=E5=94=AE=E5=90=8E=E5=8D=95=E4=B8=AD=E5=B0=BD=E9=87=8F=E4=BD=BF?= =?UTF-8?q?=E7=94=A8refund=5Fid=E5=8F=82=E6=95=B0=EF=BC=88=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=9C=89=E5=80=BC=E7=9A=84=E8=AF=9D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order_afs.go | 2 +- business/partner/purchase/mtwm/order_afs.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/order_afs.go b/business/jxcallback/orderman/order_afs.go index bc6d1eb88..a6acd0525 100644 --- a/business/jxcallback/orderman/order_afs.go +++ b/business/jxcallback/orderman/order_afs.go @@ -311,7 +311,7 @@ func (c *OrderManager) UpdateAfsOrderFields(afsOrder *model.AfsOrder, fieldList func (c *OrderManager) setAfsOrderID(db *dao.DaoDB, orderStatus *model.OrderStatus) { // globals.SugarLogger.Debugf("setAfsOrderID1 orderStatus:%v", utils.Format4Output(orderStatus, true)) - if orderStatus.VendorOrderID == "" { + if dao.IsVendorThingIDEmpty(orderStatus.VendorOrderID) { index := 1 if afsOrderList, err2 := dao.GetAfsOrders(db, orderStatus.RefVendorID, orderStatus.RefVendorOrderID, ""); err2 == nil { if len(afsOrderList) > 0 { diff --git a/business/partner/purchase/mtwm/order_afs.go b/business/partner/purchase/mtwm/order_afs.go index 1966b60e5..cf439ac16 100644 --- a/business/partner/purchase/mtwm/order_afs.go +++ b/business/partner/purchase/mtwm/order_afs.go @@ -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 }