/// <summary> /// 获取所有功能项,若input有值则排除该功能项 /// </summary> /// <param name="input"></param> /// <returns></returns> public Task <IEnumerable <SystemMenuButtonFunctionOutput> > GetAllFunctions(GetAllFunctionsInput input) { StringBuilder sql = new StringBuilder(@"SELECT func.*,app.Code AppCode FROM dbo.System_Function func LEFT JOIN dbo.System_App app ON app.Code=func.AppCode"); if (!input.Id.IsNullOrEmptyGuid()) { sql.Append( " WHERE 1=1 AND func.FunctionId NOT IN (SELECT FunctionId FROM System_MenuButtonFunction WHERE MenuButtonId=@menuButtonId)"); } if (input.IsPage) { sql.Append(string.Format(" AND func.IsPage='{0}'", input.IsPage)); } sql.Append(" ORDER BY Area,Controller,IsPage DESC"); return(SqlMapperUtil.SqlWithParams <SystemMenuButtonFunctionOutput>(sql.ToString(), new { menuButtonId = input.Id })); }
public async Task <JsonResult> GetAllFunctions(GetAllFunctionsInput input) { input.IsPage = true; return(Json(await _menuButtonFunctionLogic.GetAllFunctions(input))); }
/// <summary> /// 获取所有功能项,若input有值则排除该功能项 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <IEnumerable <SystemMenuButtonFunctionOutput> > GetAllFunctions(GetAllFunctionsInput input) { return((await _menuButtonFunctionRepository.GetAllFunctions(input)).ToList()); }