Exemplo n.º 1
0
        /// <summary>
        /// 获取跨店奖励统计
        /// 胡灵波
        /// 20150427
        /// </summary>
        public static void  GetClienterCrossShopLog()
        {
            int daysAgo = ETS.Config.ClienterCrossShopLogDaysAgo;
            CrossShopStatisticLogProvider CrossShopLog = new CrossShopStatisticLogProvider();

            while (true)
            {
                try
                {
                    if (DateTime.Now.Hour == ETS.Config.StartClienterCrossShopLogTime)
                    {
                        if (CrossShopLog.InsertDataCrossShopStatisticLog(daysAgo))
                        {
                            ETS.Util.LogHelper.LogWriter("获取跨店奖励统计计算成功" + DateTime.Now.ToString() + ":");
                        }
                        else
                        {
                            ETS.Util.LogHelper.LogWriter("获取跨店奖励统计计算失败" + DateTime.Now.ToString() + ":");
                        }
                    }
                }
                catch (Exception ex)
                {
                    ETS.Util.LogHelper.LogWriter(ex.ToString());
                }
                Thread.Sleep(1000 * 60 * 20);
            }
        }
Exemplo n.º 2
0
        //使用Common.Logging.dll日志接口实现日志记录
        #region IJob 成员

        public void Execute(Quartz.IJobExecutionContext context)
        {
            try
            {
                int daysAgo = ETS.Config.ClienterCrossShopLogDaysAgo;
                CrossShopStatisticLogProvider CrossShopLog = new CrossShopStatisticLogProvider();
                if (CrossShopLog.InsertDataCrossShopStatisticLog(daysAgo))
                {
                    ETS.Util.LogHelper.LogWriter("获取跨店奖励统计计算成功" + DateTime.Now.ToString() + ":");
                }
                else
                {
                    ETS.Util.LogHelper.LogWriter("获取跨店奖励统计计算失败" + DateTime.Now.ToString() + ":");
                }
            }
            catch (Exception ex)
            {
                ETS.Util.LogHelper.LogWriter(ex.Message + DateTime.Now.ToString());
            }
        }