示例#1
0
        private void UpdateCampaignByOrder(Campaign orderCampaign)
        {
            orderCampaign.TotalSales       = _repository.OrderCountByProductCode(orderCampaign.ProductCode);
            orderCampaign.Turnover         = _appTimeRepository.FindActiveAppTime().TurnOver;
            orderCampaign.AverageItemPrice =
                _repository.OrderPricesByProductCode(orderCampaign.ProductCode).Average();

            _campaignRepository.UpdateCampaign(orderCampaign);
        }
示例#2
0
 public AppTime FindAppTime()
 {
     return(_appTimeRepository.FindActiveAppTime());
 }