From 7c065901c44ae07fbc6b238c3f19e46cd887dec4 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 9 Oct 2023 10:01:44 +0800 Subject: [PATCH] fix --- server/product/internal/logic/gettagproductlistlogic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/product/internal/logic/gettagproductlistlogic.go b/server/product/internal/logic/gettagproductlistlogic.go index a3861e39..c9acb611 100644 --- a/server/product/internal/logic/gettagproductlistlogic.go +++ b/server/product/internal/logic/gettagproductlistlogic.go @@ -338,7 +338,7 @@ func (l *GetTagProductListLogic) organizationLevelRelation(minLevel int, mapTagL parent.ChildTagList = append(parent.ChildTagList, tagItem) //排序 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 } @@ -366,7 +366,7 @@ func (l *GetTagProductListLogic) organizationLevelRelation(minLevel int, mapTagL } //排序 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 }