public MsgModel SelectUser(int pageIndex, int pageSize, long?orgId, string userName, string phone, string email, bool?enabled, DateTime?createStartTime, DateTime?createEndTime) { var result = _mySystemDal.SelectUser(orgId, userName, phone, email, enabled, createStartTime, createEndTime); int items = result.Count(); PageModel <SysUserOrg> pageModel = new PageModel <SysUserOrg> { pageNum = pageIndex, size = pageSize, records = result.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(), total = items, pageSize = items % pageSize > 0 ? items / pageSize + 1 : items / pageSize // 分页 }; return(MsgModel.Success(pageModel)); }