门店等级

This commit is contained in:
苏尹岚
2020-06-11 13:57:13 +08:00
parent d624b5a06f
commit b1e2775ecb

View File

@@ -1084,13 +1084,13 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
order.ConsigneeLng = jxutils.StandardCoordinate2Int(lng) order.ConsigneeLng = jxutils.StandardCoordinate2Int(lng)
order.ConsigneeLat = jxutils.StandardCoordinate2Int(lat) order.ConsigneeLat = jxutils.StandardCoordinate2Int(lat)
} }
if order.StoreName != "" { // if order.StoreName != "" {
storeMaps, _ := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDJDShop}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", order.StoreName) // storeMaps, _ := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDJDShop}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", order.StoreName)
if len(storeMaps) > 0 { // if len(storeMaps) > 0 {
order.StoreID = storeMaps[0].StoreID // order.StoreID = storeMaps[0].StoreID
order.VendorStoreID = storeMaps[0].VendorStoreID // order.VendorStoreID = storeMaps[0].VendorStoreID
} // }
} else { // } else {
storeList, err := common.GetStoreListByLocation(ctx, jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), 5000, false, true) storeList, err := common.GetStoreListByLocation(ctx, jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), 5000, false, true)
if err != nil { if err != nil {
globals.SugarLogger.Debugf("jds GetStoreListByLocation error: %v", err.Error()) globals.SugarLogger.Debugf("jds GetStoreListByLocation error: %v", err.Error())
@@ -1098,7 +1098,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
} }
order.StoreID = storeList[0].ID order.StoreID = storeList[0].ID
order.StoreName = storeList[0].Name order.StoreName = storeList[0].Name
} // }
//如果是暂停,表示是预订单 //如果是暂停,表示是预订单
if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusPause { if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusPause {
order.BusinessType = model.BusinessTypeDingshida order.BusinessType = model.BusinessTypeDingshida