예제 #1
0
        /// <summary>
        /// 分页获取
        /// </summary>
        /// <param name="employeePageRequestDto"></param>
        /// <returns></returns>

        public async Task <PageData> GetPageListAsync(EmployeePageRequestDto employeePageRequestDto)
        {
            var pageData = new PageData(employeePageRequestDto.PageIndex, employeePageRequestDto.PageSize);
            var list     = await _employeeRespository.WherePaged(pageData, employeePageRequestDto.GetOrgRoleEmployeeExpression(),
                                                                 e => e.CreateDate, false);

            pageData.Data = list.MapToList <Employee, EmployeeQueryDto>().ToList();
            return(pageData);
        }