/// <summary> /// 根据用户Id获取Article分页列表(自定义存储过程) /// </summary> /// <param name="userId"></param> /// <param name="state">-1所有 0待审核 1 已通过 2未通过..</param> /// <param name="pageIndex">页码</param> /// <param name="pageSize">每页显示条数</param> /// <returns>Article列表</returns> public static async Task <IEnumerable <ArticleVModel> > SearchArticlesByUserId(int userId, int state, int pageIndex, int pageSize) { var par = new DynamicParameters(); par.Add("@PageIndex", pageIndex, DbType.Int32); par.Add("@PageSize", pageSize, DbType.Int32); par.Add("@UserId", userId, DbType.Int32); par.Add("@State", state, DbType.Int32); par.Add("@TotalCount", 0, DbType.Int32, ParameterDirection.Output); var result = await DapWrapper.InnerQueryProcAsync <ArticleVModel>(DbConfig.ArticleManagerConnString, "proc_GetArticlePageListByUserId", par); return(result); }