From 142990b2a6a1091eda831b2945628c185d2af7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 20 Jan 2021 14:25:46 +0800 Subject: [PATCH] aaa --- business/jxstore/cms/permission.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/business/jxstore/cms/permission.go b/business/jxstore/cms/permission.go index 7368731ef..55780af5e 100644 --- a/business/jxstore/cms/permission.go +++ b/business/jxstore/cms/permission.go @@ -163,7 +163,6 @@ func UpdateUserRole(ctx *jxcontext.Context, userIDs []string, roleIDs []int) (er userRoleMap[v.UserID] = append(userRoleMap[v.UserID], v.RoleID) } } - fmt.Println("userRoleMap", userRoleMap) for _, userID := range userIDs { nowRoleIDs := userRoleMap[userID] for _, nowRoleID := range nowRoleIDs { @@ -172,16 +171,12 @@ func UpdateUserRole(ctx *jxcontext.Context, userIDs []string, roleIDs []int) (er } nowRoleIDMap[nowRoleID] = 1 } - fmt.Println("nowRoleIDMap", nowRoleIDMap) - fmt.Println("roleIDMap", roleIDMap) for roleID, _ := range roleIDMap { if nowRoleIDMap[roleID] == 0 { addUserRoleMap[userID] = append(addUserRoleMap[userID], roleID) } } } - fmt.Println("1 ", addUserRoleMap) - fmt.Println("2 ", deleteUserRoleMap) dao.Begin(db) defer func() { if r := recover(); r != nil { @@ -250,7 +245,7 @@ func UpdateRoleMenu(ctx *jxcontext.Context, roleIDs, menuIDs []int) (err error) } nowMenuIDMap[nowMenuID] = 1 } - for _, menuID := range menuIDMap { + for menuID, _ := range menuIDMap { if nowMenuIDMap[menuID] == 0 { addRoleMenuMap[menuID] = append(addRoleMenuMap[menuID], menuID) }