/// <summary> /// 根据角色ID获取菜单列表 /// </summary> /// <param name="roleId"></param> /// <returns></returns> private IEnumerable <ModuleModel> GetModuleListByRoleId(int roleId) { string sql = @"SELECT m.* FROM Module m"; var list = ModuleRepository.GetModuleListByRoleId(sql, roleId); return(list); }
/// <summary> /// 根据角色ID获取菜单列表 /// </summary> /// <param name="roleId"></param> /// <returns></returns> private IEnumerable <ModuleModel> GetModuleListByRoleId(int roleId) { string sql = @"SELECT b.* FROM roleauthorize a INNER JOIN module b ON a.ModuleId = b.Id"; var list = ModuleRepository.GetModuleListByRoleId(sql, roleId); return(list); }