Ejemplo n.º 1
0
        /// <summary>
        /// 查询店铺消费报表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task <PagedResultDto <ShopReportData> > GetDataStatisticsAsync(GetShopReportDataInput input)
        {
            List <ShopReportData> entity = null;

            if (input.TimeType == 2)
            {
                entity = await _retailerRepository.GetShopReportByRangeAsync(input.BeginTime, input.EndTime);
            }
            else
            {
                entity = await _retailerRepository.GetShopReportAsync();
            }
            var shopReportDataCount = entity.Count();

            var statisticsListDto = entity.MapTo <List <ShopReportData> >();

            return(new PagedResultDto <ShopReportData>(
                       shopReportDataCount,
                       statisticsListDto
                       ));
        }