fix
This commit is contained in:
parent
12bc736d49
commit
9647fe060a
|
@ -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),//组装等级从属关系
|
||||
})
|
||||
}
|
||||
//排序推荐产品结构体
|
||||
|
|
Loading…
Reference in New Issue
Block a user