From b1e2775ecb747bb14b1ad091c0d3f825966e9627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 11 Jun 2020 13:57:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 15005729c..2845122c2 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1084,21 +1084,21 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o order.ConsigneeLng = jxutils.StandardCoordinate2Int(lng) order.ConsigneeLat = jxutils.StandardCoordinate2Int(lat) } - if order.StoreName != "" { - storeMaps, _ := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDJDShop}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", order.StoreName) - if len(storeMaps) > 0 { - order.StoreID = storeMaps[0].StoreID - order.VendorStoreID = storeMaps[0].VendorStoreID - } - } else { - storeList, err := common.GetStoreListByLocation(ctx, jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), 5000, false, true) - if err != nil { - globals.SugarLogger.Debugf("jds GetStoreListByLocation error: %v", err.Error()) - continue - } - order.StoreID = storeList[0].ID - order.StoreName = storeList[0].Name + // if order.StoreName != "" { + // storeMaps, _ := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDJDShop}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", order.StoreName) + // if len(storeMaps) > 0 { + // order.StoreID = storeMaps[0].StoreID + // order.VendorStoreID = storeMaps[0].VendorStoreID + // } + // } else { + storeList, err := common.GetStoreListByLocation(ctx, jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), 5000, false, true) + if err != nil { + globals.SugarLogger.Debugf("jds GetStoreListByLocation error: %v", err.Error()) + continue } + order.StoreID = storeList[0].ID + order.StoreName = storeList[0].Name + // } //如果是暂停,表示是预订单 if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusPause { order.BusinessType = model.BusinessTypeDingshida