From 70233af5426b0d1c343ebe87183303a34a9aaa58 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期三, 20 十一月 2024 09:05:38 +0800 Subject: [PATCH] WIDESEAWCS_QuartzJob更新版本 --- WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs index 90931c6..7f7dba0 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_DTO.System; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseRepository; using WIDESEAWCS_Core.BaseServices; @@ -61,7 +62,7 @@ } - public List<Sys_Menu> GetUserMenuList(int roleId) + public List<MenuDTO> GetUserMenuList(int roleId) { if (App.User.IsRoleIdSuperAdmin(roleId)) { @@ -71,7 +72,7 @@ return BaseDal.GetAllMenu().Where(x => menuIds.Contains(x.MenuId)).ToList(); } - public List<Sys_Actions> GetActions(int menuId, List<Sys_Actions> menuActions, List<Permissions> permissions, int roleId) + public List<ActionDTO> GetActions(int menuId, List<ActionDTO> menuActions, List<Permissions> permissions, int roleId) { if (App.User.IsRoleIdSuperAdmin(roleId)) { @@ -146,7 +147,8 @@ bool _changed = false; if (menu.MenuId <= 0) { - BaseDal.AddData(menu); + int id = BaseDal.AddData(menu); + menu.MenuId = id; } else { @@ -173,5 +175,17 @@ return webResponse; } + + public WebResponseContent DelMenu(int menuId) + { + WebResponseContent webResponse = new WebResponseContent(); + if(BaseDal.QueryFirst(x=>x.ParentId == menuId) != null) + { + return webResponse = WebResponseContent.Instance.Error("褰撳墠鑿滃崟瀛樺湪瀛愯彍鍗�,璇峰厛鍒犻櫎瀛愯彍鍗�!"); + } + BaseDal.DeleteDataById(menuId); + + return webResponse = WebResponseContent.Instance.OK("鍒犻櫎鎴愬姛"); + } } } -- Gitblit v1.9.3