/// <summary> /// 审核短信 - 成功 /// </summary> /// <param name="AuditAccountLoginName"></param> /// <param name="SMSIDList"></param> /// <returns></returns> public RPC_Result AuditSMSSuccess(string AuditAccountLoginName, List <string> SMSIDList, string SendChannel) { try { SMS.DB.SMSDAL.AuditSMSSuccess(AuditAccountLoginName, SMSIDList, SendChannel); foreach (var smsid in SMSIDList) { var sms = SMSDAL.GetSMSById(smsid); if (sms.Message.SMSTimer != null) { SMSDAL.AddSMSTimer(sms.Message.ID, sms.Message.SMSTimer.Value); } else { SMSSubmit.Instance.SendSMS(sms); } } return(new RPC_Result(true, "操作完成!", 0)); } catch (OperateException oe) { return(new RPC_Result(false, oe.Message, oe.ErrorCode)); } catch (Exception ex) { MessageTools.MessageHelper.Instance.WirteError("审核时发生了异常", ex); return(new RPC_Result(false, "审核时发生了异常", 0)); } }
/// <summary> /// /// </summary> static void StartSMSTimerMonitor() { Task t = new Task(() => { while (true) { var list = SMSDAL.GetTimerSMS(); if (list != null && list.Count > 0) { foreach (var smsid in list) { var sms = SMSDAL.GetSMSById(smsid); SMSSubmit.Instance.SendSMS(sms); } } Thread.Sleep(1000 * 30); } }); t.Start(); }