|
@@ -413,7 +413,7 @@ func (s *adminService) GetMenus(ctx context.Context, uid uint) (*v1.GetMenuRespo
|
|
|
sort.Slice(list, func(i, j int) bool {
|
|
|
// 如果权重不同,按权重比较
|
|
|
if list[i].Weight != list[j].Weight {
|
|
|
- return list[i].Weight < list[j].Weight
|
|
|
+ return list[i].Weight > list[j].Weight
|
|
|
}
|
|
|
// 如果权重相同,按ID比较,保证稳定排序
|
|
|
return list[i].ID < list[j].ID
|