From 90db381b5afb6e0247f3cfc7b27992412dcd15e8 Mon Sep 17 00:00:00 2001 From: wenjianzhang Date: Thu, 25 Aug 2022 14:18:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=F0=9F=90=9B:=20=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E8=8F=9C=E5=8D=95=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(690)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/models/sys_menu.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/models/sys_menu.go b/app/admin/models/sys_menu.go index c8c02786..a14a795a 100644 --- a/app/admin/models/sys_menu.go +++ b/app/admin/models/sys_menu.go @@ -33,7 +33,7 @@ type SysMenu struct { type SysMenuSlice []SysMenu func (x SysMenuSlice) Len() int { return len(x) } -func (x SysMenuSlice) Less(i, j int) bool { return x[i].MenuId < x[j].MenuId } +func (x SysMenuSlice) Less(i, j int) bool { return x[i].Sort < x[j].Sort } func (x SysMenuSlice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } func (SysMenu) TableName() string { @@ -47,4 +47,4 @@ func (e *SysMenu) Generate() models.ActiveRecord { func (e *SysMenu) GetId() interface{} { return e.MenuId -} \ No newline at end of file +}