门店等级
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user