From f142e86b68f5480f342442b1a4ae4c6a4fc3d912 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期二, 17 十二月 2024 09:08:12 +0800 Subject: [PATCH] 1 --- WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs index 72dd01b..72c4335 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_RoleService.cs @@ -107,7 +107,7 @@ //鑾峰彇鐢ㄦ埛鏉冮檺 List<Permissions> permissions = _MenuRepository.GetPermissions(roleId); //鏉冮檺鐢ㄦ埛鏉冮檺鏌ヨ鎵�鏈夌殑鑿滃崟淇℃伅 - List<Sys_Menu> menus = _MenuService.GetUserMenuList(roleId); + List<MenuDTO> menus = _MenuService.GetUserMenuList(roleId); //鑾峰彇褰撳墠鐢ㄦ埛鏉冮檺濡�:(Add,Search)瀵瑰簲鐨勬樉绀烘枃鏈俊鎭:Add锛氭坊鍔狅紝Search:鏌ヨ var data = menus.Select(x => new { @@ -132,8 +132,7 @@ string message = ""; try { - UserInfo user = App.User.GetCurrentUserInfo(); - if (!GetAllChildren(user.RoleId).Exists(x => x.Id == roleId)) + if (!GetAllChildren(App.User.RoleId).Exists(x => x.Id == roleId)) return WebResponseContent.Instance.Error("娌℃湁鏉冮檺淇敼姝よ鑹茬殑鏉冮檺淇℃伅"); //褰撳墠鐢ㄦ埛鐨勬潈闄� List<Permissions> permissions = _MenuRepository.GetPermissions(App.User.RoleId); @@ -166,9 +165,9 @@ AuthValue = string.Join(",", arr), AuthId = auth == null ? 0 : auth.AuthId, ModifyDate = DateTime.Now, - Modifier = user.UserName, + Modifier = App.User.UserName, CreateDate = DateTime.Now, - Creater = user.UserName + Creater = App.User.UserName }); } else @@ -193,7 +192,7 @@ x.AuthValue = ""; }); //灏嗗彇娑堢殑鏉冮檺璁剧疆涓�"" - _RoleAuthRepository.UpdateData(delAuths); + _RoleAuthRepository.DeleteData(delAuths); int addCount = updateAuths.Where(x => x.AuthId <= 0).Count(); int updateCount = updateAuths.Where(x => x.AuthId > 0).Count(); -- Gitblit v1.9.3