1
This commit is contained in:
@@ -6093,10 +6093,8 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
|
|||||||
|
|
||||||
for _, i := range storeInfos {
|
for _, i := range storeInfos {
|
||||||
homePage := HomePageInfos{}
|
homePage := HomePageInfos{}
|
||||||
i := i
|
|
||||||
homePage.StoreInfo = i
|
homePage.StoreInfo = i
|
||||||
for _, j := range storeDeductionInfos {
|
for _, j := range storeDeductionInfos {
|
||||||
j := j
|
|
||||||
if i.StoreID == j.StoreID {
|
if i.StoreID == j.StoreID {
|
||||||
homePage.StoreDeductionInfo = append(homePage.StoreDeductionInfo, j)
|
homePage.StoreDeductionInfo = append(homePage.StoreDeductionInfo, j)
|
||||||
} else {
|
} else {
|
||||||
@@ -6104,7 +6102,6 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, k := range StoreSkuInfos {
|
for _, k := range StoreSkuInfos {
|
||||||
k := k
|
|
||||||
if i.StoreID == k.StoreID {
|
if i.StoreID == k.StoreID {
|
||||||
homePage.StoreSkuInfo = append(homePage.StoreSkuInfo, k)
|
homePage.StoreSkuInfo = append(homePage.StoreSkuInfo, k)
|
||||||
} else {
|
} else {
|
||||||
@@ -6113,7 +6110,8 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
|
|||||||
}
|
}
|
||||||
homePages = append(homePages, homePage)
|
homePages = append(homePages, homePage)
|
||||||
}
|
}
|
||||||
|
// todo 明天测试西南交大店首页没商品
|
||||||
|
globals.SugarLogger.Debugf("----------homePages := %s", utils.Format4Output(homePages, false))
|
||||||
return homePages, "", nil
|
return homePages, "", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3749,6 +3749,7 @@ func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (storeSkuNameE
|
|||||||
for _, v := range skuMap {
|
for _, v := range skuMap {
|
||||||
storeSkuNameExt2 = append(storeSkuNameExt2, v)
|
storeSkuNameExt2 = append(storeSkuNameExt2, v)
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("----------storeSkuNameExt2:%s", utils.Format4Output(storeSkuNameExt2, false))
|
||||||
for i := 0; i < len(storeSkuNameExt2)-1; i++ {
|
for i := 0; i < len(storeSkuNameExt2)-1; i++ {
|
||||||
for j := 0; j < len(storeSkuNameExt2)-i-1; j++ {
|
for j := 0; j < len(storeSkuNameExt2)-i-1; j++ {
|
||||||
if storeSkuNameExt2[j].Count < storeSkuNameExt2[j+1].Count {
|
if storeSkuNameExt2[j].Count < storeSkuNameExt2[j+1].Count {
|
||||||
@@ -3758,6 +3759,7 @@ func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (storeSkuNameE
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("----------storeSkuNameExt255:%s", utils.Format4Output(storeSkuNameExt2, false))
|
||||||
return storeSkuNameExt2, err
|
return storeSkuNameExt2, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user