diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index e8ee2262c..1a4fb5385 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -3734,10 +3734,14 @@ func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (storeSkuNameE if len(storeIDs) == 0 { return storeSkuNameExt2, err } + globals.SugarLogger.Debugf("---storeIds := %s", utils.Format4Output(storeIDs, false)) storeSkuNameExt, err := dao.GetTopSkusByStoreIDs(db, storeIDs) if err != nil { return nil, err } + for _, v := range storeSkuNameExt { + globals.SugarLogger.Debugf("----------------storeSkuNameExtv := %d,%d", v.StoreID, v.SkuID) + } for _, v := range storeSkuNameExt { if skuMap[v.SkuID] == nil { @@ -3749,7 +3753,6 @@ 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 { @@ -3759,7 +3762,10 @@ func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (storeSkuNameE } } } - globals.SugarLogger.Debugf("----------storeSkuNameExt255:%s", utils.Format4Output(storeSkuNameExt2, false)) + for _, v := range storeSkuNameExt2 { + globals.SugarLogger.Debugf("---------------- storeSkuNameExt 2 v := %d,%d", v.StoreID, v.SkuID) + } + return storeSkuNameExt2, err }