diff --git a/server/product/internal/logic/gettagproductlistlogic.go b/server/product/internal/logic/gettagproductlistlogic.go index c71d45e2..73d75f9c 100644 --- a/server/product/internal/logic/gettagproductlistlogic.go +++ b/server/product/internal/logic/gettagproductlistlogic.go @@ -344,9 +344,9 @@ func (l *GetTagProductListLogic) organizationLevelRelation(minLevel int, mapTagL }) mapTagLevel[parentPrefix] = parent } - //把子类的产品列表变成产品id列表并且把产品列表都放到最顶级父级中 + //顶层集子类产品于一身 for _, v := range mapTagLevel { - if _, ok := mapTop[v.LevelPrefix]; ok { + if _, ok := mapTop[v.LevelPrefix]; !ok { continue } //初始化