using System; using System.Text.RegularExpressions; using JiepeiWMS.Common; using JiepeiWMS.Extends; using log4net; namespace JiepeiWMS.Common { public static class SmsHelper { private static readonly ILog log = LogManager.GetLogger(typeof(SmsHelper)); /// /// 添加发送短信 /// public static bool Send(string note, string tel) { try { if (tel.IsCanSendMobile()) { YiMeiMsmHelper.Send(tel, note); return true; } return false; } catch (Exception ex) { //LogHelper.Error(ex); log.Error(ex); return false; } } /// /// 添加定时发送短信 /// public static bool SendTimerSms(string note, string tel, string sendTime) { try { if (tel.IsCanSendMobile()) { YiMeiMsmHelper.SendTimerSms(tel, note, sendTime); return true; } return false; } catch (Exception ex) { log.Error(ex); return false; } } /// /// 发送语音短信 /// add by wangyongbo 2020-11-18 /// /// /// /// public static bool SendVoice(string note, string tel) { try { if (tel.IsCanSendMobile()) { YiMeiMsmHelper.SendVoice(tel, note); return true; } return false; } catch (Exception ex) { log.Error(ex); return false; } } /// /// 添加发送语音验证 /// public static bool SendVote(string note, string tel) { try { if (tel.IsCanSendMobile()) { //Pcb.Common.WKSms.smsSoapClient sms = new Pcb.Common.WKSms.smsSoapClient(); // note = "(捷配)" + note; bool isSend = false; YiMeiMsmHelper.Send(tel, note); return isSend; } return false; } catch (Exception ex) { log.Error(ex); return false; } } } }