using Quartz; using System; using WX.CRM.BLL.Wx; using WX.CRM.Common; namespace WX.CRM.CRMServices.WeiXin { public class WorkAccountManualPauseHandle { public void Start() { LogHelper.Info("==================开始处理手工暂停工作微信Start=============="); WX_WORKACCOUNT_BL wx_WorkAccount_BL = new WX_WORKACCOUNT_BL(); string errmsg = string.Empty; var flag = wx_WorkAccount_BL.EveryDayManualPauseHandle(out errmsg); if (!flag) { LogHelper.Info("处理手工暂停工作微信失败:" + errmsg); } else { LogHelper.Info("处理手工暂停工作微信成功!"); } LogHelper.Info("==================结束处理手工暂停工作微信End。"); } } public class WorkAccountManualPauseHandleJob : IJob { static bool _isNotice = false; public void Execute(JobExecutionContext context) { if (_isNotice) return; try { _isNotice = true; new WorkAccountManualPauseHandle().Start(); } catch (Exception ex) { LogHelper.Error("WX.CRM.WinService.WeiXin.WorkAccountManualPauseHandleJob.Execute:" + ex); } finally { _isNotice = false; } throw new NotImplementedException(); } } public class WorkAccountSystemPauseHandle { public void Start() { LogHelper.Info("==================开始处理系统暂停工作微信Start=============="); WX_WORKACCOUNT_BL wx_WorkAccount_BL = new WX_WORKACCOUNT_BL(); string errmsg = string.Empty; var flag = wx_WorkAccount_BL.EveryDaySystemPauseHandle(out errmsg); if (!flag) { LogHelper.Info("处理系统暂停工作微信失败:" + errmsg); } else { LogHelper.Info("处理系统暂停工作微信成功!"); } LogHelper.Info("==================结束处理系统暂停工作微信End。"); } } public class WorkAccountSystemPauseHandleJob : IJob { static bool _isNotice = false; public void Execute(JobExecutionContext context) { if (_isNotice) return; try { _isNotice = true; new WorkAccountSystemPauseHandle().Start(); } catch (Exception ex) { LogHelper.Error("WX.CRM.WinService.WeiXin.WorkAccountSystemPauseHandleJob.Execute:" + ex); } finally { _isNotice = false; } throw new NotImplementedException(); } } }