From 2403c5176432b55f18574f1b10061f33a0d48899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 18 Dec 2019 10:29:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 6 +++++- business/jxcallback/orderman/orderman_ext.go | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 50b86a75d..3712983eb 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -267,7 +267,11 @@ func (c *OrderManager) SaveOrder(order *model.GoodsOrder, isAdjust bool, db *dao } else { isDuplicated = true order.DuplicatedCount++ - db.Db.Update(order, "DuplicatedCount") + if order.Status == model.OrderStatusCanceled || order.Status == model.OrderStatusFinished { + db.Db.Update(order, "DuplicatedCount", "Status") + } else { + db.Db.Update(order, "DuplicatedCount") + } baseapi.SugarLogger.Infof("saveOrder duplicated orderid:%s msg received", order.VendorOrderID) } } diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index f34241334..d519d086b 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -996,7 +996,9 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in missingOrderList = append(missingOrderList, pair) } } else { - + if time.Now().Sub(goodsOrder.ExpectedDeliveredTime).Hours() >= 5 { + missingOrderList = append(missingOrderList, pair) + } } } }