From 1922aed876c2534e485e7573b39dbf1f82577c67 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 27 Sep 2019 18:23:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E8=A5=BF=E5=B9=B3=E5=8F=B0=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=B9=9F=E8=A6=81=E4=BE=9D=E6=8D=AE=E9=97=A8=E5=BA=97?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E8=AE=BE=E7=BD=AE=E5=88=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index f6eadb525..b35815a84 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -399,8 +399,21 @@ func (c *OrderManager) updateOrderOtherInfo(order *model.GoodsOrder, db *dao.Dao payPercentage = storeDetail.PayPercentage } } else { + store := &model.Store{} + store.ID = order.StoreID + if err = dao.GetEntity(dao.GetDB(), store); err != nil { + if !dao.IsNoRowsError(err) { + globals.SugarLogger.Warnf("updateOrderOtherInfo GetEntity orderID:%s, VendorStoreID:%s, error:%v", order.VendorOrderID, order.VendorStoreID, err) + return err + } + if time.Now().Sub(order.OrderCreatedAt) < 1*time.Hour { + globals.SugarLogger.Infof("updateOrderOtherInfo b, [运营]订单在京西与平台都找不到京西门店信息,订单:%s,平台门店ID:%s,平台:%s", order.VendorOrderID, order.VendorStoreID, model.VendorChineseNames[order.VendorID]) + } + err = nil + } else { + payPercentage = store.PayPercentage + } order.JxStoreID = order.StoreID - payPercentage = 100 } if err = c.updateOrderSkuOtherInfo(order, db, payPercentage); err == nil { jxutils.RefreshOrderSkuRelated(order)