This commit is contained in:
laodaming 2023-10-09 10:04:41 +08:00
parent 23b8e3cf3c
commit 49877b4ef7

View File

@ -337,7 +337,7 @@ func (l *GetTagProductListLogic) organizationLevelRelation(minLevel int, mapTagL
parent.ChildTagList = append(parent.ChildTagList, tagItem) parent.ChildTagList = append(parent.ChildTagList, tagItem)
//排序 //排序
sort.SliceStable(parent.ChildTagList, func(i, j int) bool { sort.SliceStable(parent.ChildTagList, func(i, j int) bool {
return parent.ChildTagList[i].Sort > parent.ChildTagList[j].Sort return parent.ChildTagList[i].Sort < parent.ChildTagList[j].Sort
}) })
mapTagLevel[parentPrefix] = parent mapTagLevel[parentPrefix] = parent
} }
@ -365,7 +365,7 @@ func (l *GetTagProductListLogic) organizationLevelRelation(minLevel int, mapTagL
} }
//排序 //排序
sort.SliceStable(rspList, func(i, j int) bool { sort.SliceStable(rspList, func(i, j int) bool {
return rspList[i].Sort > rspList[j].Sort return rspList[i].Sort < rspList[j].Sort
}) })
return rspList, productCount return rspList, productCount
} }