diff --git a/server/product/internal/logic/gettagproductlistlogic.go b/server/product/internal/logic/gettagproductlistlogic.go index a5adab88..3043ec68 100644 --- a/server/product/internal/logic/gettagproductlistlogic.go +++ b/server/product/internal/logic/gettagproductlistlogic.go @@ -186,14 +186,7 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR } //map tag菜单 mapTagLevel := make(map[string]*types.TagItem) - minLevel := int64(0) //记录最小等级数字 for _, tagInfo := range tagList { - if minLevel == 0 && *tagInfo.Level > 0 { - minLevel = *tagInfo.Level - } - if minLevel > *tagInfo.Level { - minLevel = *tagInfo.Level - } tagTem := types.TagItem{ TagProductList: nil, TagRecommendProductList: nil, @@ -252,11 +245,9 @@ func (l *GetTagProductListLogic) GetTagProductList(req *types.GetTagProductListR //加入分类 mapTagLevel[*tagInfo.LevelPrefix] = &tagTem } - //组装等级从属关系 - return resp.SetStatusWithMessage(basic.CodeOK, "success", types.GetTagProductListRsp{ TotalCategory: len(mapTagLevel), - TagList: l.organizationLevelRelation(mapTagLevel), + TagList: l.organizationLevelRelation(mapTagLevel),//组装等级从属关系 }) } //排序推荐产品结构体