public JsonResult GetList(int type, JqGridParam jqgridparam) { jqgridparam.rows = jqgridparam.rows < 1 ? 15 : jqgridparam.rows; if (type == 0) { var query = new QueryLoginLogModel() { PageIndex = jqgridparam.page, PageSize = jqgridparam.rows, OrderBy = jqgridparam.sord, }; var result = ServiceHelper.CallService <PagedListData <List <SysLoginLog> > >(ServiceConst.LogApi.GetLoginLogPageList, JsonConvert.SerializeObject(query), this.CurrentUser.Token); var json = result.Data.JqGridJsonData(); return(Json(json, JsonRequestBehavior.AllowGet)); } else if (type == 1) { var query = new QueryOperationLogModel() { PageIndex = jqgridparam.page, PageSize = jqgridparam.rows, OrderBy = jqgridparam.sord, }; var result = ServiceHelper.CallService <PagedListData <List <SysOperationLog> > >(ServiceConst.LogApi.GetOperaterLogPageList, JsonConvert.SerializeObject(query), this.CurrentUser.Token); var json = result.Data.JqGridJsonData(); return(Json(json, JsonRequestBehavior.AllowGet)); } else if (type == 2) { var query = new QueryExceptionLogModel() { PageIndex = jqgridparam.page, PageSize = jqgridparam.rows, OrderBy = jqgridparam.sord, }; var result = ServiceHelper.CallService <PagedListData <List <SysExceptionLog> > >(ServiceConst.LogApi.GetExceptionLogPageList, JsonConvert.SerializeObject(query), this.CurrentUser.Token); var json = result.Data.JqGridJsonData(); return(Json(json, JsonRequestBehavior.AllowGet)); } else { return(Json(string.Empty, JsonRequestBehavior.AllowGet)); } }
public PagedListData <List <SysLoginLog> > GetListByQuery(QueryLoginLogModel query) { var model = new PageListModel() { WithColumn = @"[Id] ,[AccessChannelId] ,[UserId] ,[UserName] ,[LogDate] ,[Token] ,[LogOutDate] ,[ClientIpAddress] ,[ClientName] ,[OnlineDate] ,[IsSucceed] ,[LogReason] ,[SessionId] ,[InUserType] ,[IPNum] ,[Enabled] ,[DelUser] ,[DelState] ,[DelDate]", WithWhere = " 1=1", LeftColumn = string.Empty, LeftJoin = string.Empty, }; var pageSearch = new PageSearch() { OrderBy = " LogDate desc", PageIndex = query.PageIndex, PageSize = query.PageSize, Where = query.Where }; return(this.PagedListQuery(model, pageSearch)); }
public ResponseResult <PagedListData <List <SysLoginLog> > > GetLoginLogPageList(QueryLoginLogModel pages) { try { pages.PageSize = pages.PageSize == 0 ? 15 : pages.PageSize; pages.PageIndex = pages.PageIndex < 1 ? 1 : pages.PageIndex; var service = GetService <SysLoginLogService>(); var result = service.GetListByQuery(pages); return(ResponseResult <PagedListData <List <SysLoginLog> > > .GenSuccessResponse(result)); } catch (Exception ex) { return(ResponseResult <PagedListData <List <SysLoginLog> > > .GenFaildResponse(ex.Message)); } }
public PagedListData <List <SysLoginLog> > GetListByQuery(QueryLoginLogModel query) { return(this._loginTokenRepository.GetListByQuery(query)); }