This commit is contained in:
richboo111
2022-08-26 10:13:33 +08:00
parent 804c862816
commit 98c3fecf95

View File

@@ -5732,8 +5732,7 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
storeDeductionInfos []StoreDeductionInfo
storeSkuInfo StoreSkuInfo
StoreSkuInfos []StoreSkuInfo
//homePage HomePageInfos
homePages []HomePageInfos
homePages []HomePageInfos
)
locationList, err := common.GetStoreListByLocation(ctx, lng, lat, 20000, needWalkDistance, false, 0)
if err != nil {
@@ -5782,11 +5781,8 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
storeDeductionInfos = append(storeDeductionInfos, storeDeductionInfo)
}
}
globals.SugarLogger.Debug("storeInfos============", storeInfos)
globals.SugarLogger.Debug("storeDeductionInfos=================", storeDeductionInfos)
//获取热销商品
topSkusInfo, err := GetTopSkusByStoreIDs(ctx, storeID)
globals.SugarLogger.Debug("topSkusInfo==============", topSkusInfo)
if err != nil {
return nil, "获取热销商品失败", err
}
@@ -5803,7 +5799,6 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
}
StoreSkuInfos = append(StoreSkuInfos, storeSkuInfo)
}
globals.SugarLogger.Debug("StoreSkuInfos=================", StoreSkuInfos)
for _, i := range storeInfos {
homePage := HomePageInfos{}
i := i
@@ -5826,7 +5821,6 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
}
homePages = append(homePages, homePage)
}
globals.SugarLogger.Debug("homePages====================", homePages)
}
return homePages, "", nil
}