Пример #1
0
        private static string GetActivityConfigInfo(DateTime dt)
        {
            var schedule = ConvertToSchedule(dt.Hour);

            #region 过期的待审核的数据在这里删掉
            var expiredDatas = DalActivity.SelectExpiredScheduleActivity(schedule);
            foreach (var activity in expiredDatas)
            {
                Logger.Info($"{activity}活动已经结束了,还没审核通过直接删掉了");
                DalActivity.DeleteFlashSaleTempByAcid(activity);
                DalActivity.DeleteFlashSaleProductsTempByAcid(activity);
            }
            #endregion
            var activityId = DalActivity.SelectNextScheduleActivity(schedule);
            if (string.IsNullOrEmpty(activityId))
            {
                return(null);
            }
            else
            {
                return(schedule);
            }
        }