From 839b52d1db0a158b778cab033ee8818f3abe4102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 4 Jul 2023 17:20:46 +0800 Subject: [PATCH] 1 --- business/jxcallback/orderman/order.go | 4 ++++ business/partner/purchase/tao_vegetable/order.go | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 323e5e577..597581283 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -171,6 +171,8 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m } }() + globals.SugarLogger.Debugf("========OnOrderStatusChanged : %s", vendorOrgCode) + globals.SugarLogger.Debugf("========OnOrderStatusChanged : %s", utils.Format4Output(orderStatus, false)) // 有些平台(比如美团外卖),在新订单事件没有成功返回,但在重发订单消息前,订单状态转换,则不会再重发新订单事件,特殊处理一下 if orderStatus != nil { if orderStatus.Status == model.OrderStatusAccepted { @@ -181,9 +183,11 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m } } } else { + globals.SugarLogger.Debugf("========loadOrder : %s", utils.Format4Output(loadOrder, false)) loadOrder.Status = model.OrderStatusAccepted loadOrder.VendorStatus = tao_vegetable.OrderStatusNew c.UpdateOrderFields(loadOrder, []string{"Status", "VendorStatus"}) + globals.SugarLogger.Debugf("========loadOrder : %s", utils.Format4Output(loadOrder, false)) } } } diff --git a/business/partner/purchase/tao_vegetable/order.go b/business/partner/purchase/tao_vegetable/order.go index 61c6fc604..7b9bb5881 100644 --- a/business/partner/purchase/tao_vegetable/order.go +++ b/business/partner/purchase/tao_vegetable/order.go @@ -334,9 +334,6 @@ func (c *PurchaseHandler) onOrderMsg(orderStatus, orderId string, orderCallback msg.OrderStatus = tao_vegetable.OrderStatusOnSaleCancel } status := c.callbackOrderMsg2Status(msg) - if partner.CurOrderManager.GetStatusDuplicatedCount(status) > 0 { - return nil - } // 校验重复消息 if partner.CurOrderManager.GetStatusDuplicatedCount(status) > 0 { return tao_vegetable.CallBackResultInfo(nil)