From c7cd22c633fc9a1e6cf8ffbf9d68517ae1d25001 Mon Sep 17 00:00:00 2001 From: QM303176530 <303176530@qq.com> Date: Sun, 23 Aug 2020 15:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=A4=A7bug=E7=B4=A7=E6=80=A5?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=8C=E8=8E=B7=E5=8F=96=E6=9C=AC=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E8=8F=9C=E5=8D=95=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/service/sys_menu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/service/sys_menu.go b/server/service/sys_menu.go index ac256080..b793cbf4 100644 --- a/server/service/sys_menu.go +++ b/server/service/sys_menu.go @@ -158,7 +158,7 @@ func AddMenuAuthority(menus []model.SysBaseMenu, authorityId string) (err error) func GetMenuAuthority(authorityId string) (err error, menus []model.SysMenu) { //sql := "SELECT authority_menu.keep_alive,authority_menu.default_menu,authority_menu.created_at,authority_menu.updated_at,authority_menu.deleted_at,authority_menu.menu_level,authority_menu.parent_id,authority_menu.path,authority_menu.`name`,authority_menu.hidden,authority_menu.component,authority_menu.title,authority_menu.icon,authority_menu.sort,authority_menu.menu_id,authority_menu.authority_id FROM authority_menu WHERE authority_menu.authority_id = ? ORDER BY authority_menu.sort ASC" - err = global.GVA_DB.Order("sort", true).Find(&menus).Error + err = global.GVA_DB.Where("authority_id = ? ", authorityId).Order("sort", true).Find(&menus).Error //err = global.GVA_DB.Raw(sql, authorityId).Scan(&menus).Error return err, menus }