门店等级
This commit is contained in:
@@ -1084,21 +1084,21 @@ 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())
|
||||||
continue
|
continue
|
||||||
}
|
|
||||||
order.StoreID = storeList[0].ID
|
|
||||||
order.StoreName = storeList[0].Name
|
|
||||||
}
|
}
|
||||||
|
order.StoreID = storeList[0].ID
|
||||||
|
order.StoreName = storeList[0].Name
|
||||||
|
// }
|
||||||
//如果是暂停,表示是预订单
|
//如果是暂停,表示是预订单
|
||||||
if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusPause {
|
if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusPause {
|
||||||
order.BusinessType = model.BusinessTypeDingshida
|
order.BusinessType = model.BusinessTypeDingshida
|
||||||
|
|||||||
Reference in New Issue
Block a user