/// <summary> /// 按天统计主播的工时收益 /// </summary> /// <param name="context"></param> /// <returns></returns> public Task Execute(IJobExecutionContext context) { var endTime = DateTime.Now.Date; var startTime = endTime.AddDays(-1); WorkHourIncomeService.StatisticsAnchorWorkHourIncome(startTime, endTime); return(Task.FromResult(0)); }
/// <summary> /// 按天统计主播的工时收益 /// </summary> /// <param name="context"></param> /// <returns></returns> public Task Execute(IJobExecutionContext context) { //先处理当天0点到6点的数据,在处理昨天跨天直播数据 var date = DateTime.Now.Date; WorkHourIncomeService.StatisticsAnchorWorkHourIncome(date, date.AddHours(6)); var endTime = date.AddHours(4); var startTime = endTime.AddHours(-8); WorkHourIncomeService.StatisticsAnchorWorkHourIncome(startTime, endTime); return(Task.FromResult(0)); }
public void TestWorkHour() { WorkHourIncomeService.StatisticsAnchorWorkHourIncome(Convert.ToDateTime("2020-11-23 00:00:00"), Convert.ToDateTime("2020-11-24 00:00:00")); }