From 64064afc0e4e1921fe9c8f6e588e443185c41ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 10 Oct 2024 08:57:55 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/store.go | 6 ++---- business/jxstore/cms/store_sku.go | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 45943e120..b03c8113d 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -6093,10 +6093,8 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis for _, i := range storeInfos { homePage := HomePageInfos{} - i := i homePage.StoreInfo = i for _, j := range storeDeductionInfos { - j := j if i.StoreID == j.StoreID { homePage.StoreDeductionInfo = append(homePage.StoreDeductionInfo, j) } else { @@ -6104,7 +6102,6 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis } } for _, k := range StoreSkuInfos { - k := k if i.StoreID == k.StoreID { homePage.StoreSkuInfo = append(homePage.StoreSkuInfo, k) } else { @@ -6113,7 +6110,8 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis } homePages = append(homePages, homePage) } - + // todo 明天测试西南交大店首页没商品 + globals.SugarLogger.Debugf("----------homePages := %s", utils.Format4Output(homePages, false)) return homePages, "", nil } diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 8f8701b68..e8ee2262c 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -3749,6 +3749,7 @@ func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (storeSkuNameE for _, v := range skuMap { storeSkuNameExt2 = append(storeSkuNameExt2, v) } + globals.SugarLogger.Debugf("----------storeSkuNameExt2:%s", utils.Format4Output(storeSkuNameExt2, false)) for i := 0; i < len(storeSkuNameExt2)-1; i++ { for j := 0; j < len(storeSkuNameExt2)-i-1; j++ { 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 }