/// <summary> /// 取酒短信 /// </summary> /// <param name="mobile"></param> /// <param name="descr"></param> /// <param name="vercode"></param> /// <returns></returns> public static bool MobileMesSendByTemp4(string mobile, string nowdate, string stoname, string descr, string otelphone, string vercode) { bool Flag = false; string SendKey = "mob_" + mobile; Flag = NetEaseNoteInterface.SendTemplateByNetEase("temp4", new string[1] { mobile }, new string[5] { nowdate, stoname, descr, otelphone, vercode }); if (Flag) { WebCache.Insert(SendKey, vercode, 5); } return(Flag); }
/// <summary> /// 发送手机短信 /// </summary> /// <param name="mobile"></param> /// <param name="vercode">返回验证码</param> /// <returns></returns> public static bool MobileMesSendByTemp1(string mobile, string descr, ref string vercode) { bool Flag = false; string SendKey = "mob_" + mobile; Random rd = new Random(); vercode = rd.Next(100001, 999999).ToString(); Flag = NetEaseNoteInterface.SendTemplateByNetEase("temp1", new string[1] { mobile }, new string[2] { descr, vercode }); if (Flag) { WebCache.Insert(SendKey, vercode, 5); //MemCached.AddOrReplaceCache<string>(SendKey, vercode, DateTime.Now.AddMinutes(5)); } return(Flag); }
/// <summary> /// 存酒短信 /// </summary> /// <param name="mobile"></param> /// <param name="descr"></param> /// <param name="vercode"></param> /// <returns></returns> public static bool MobileMesSendByTemp3(string mobile, string savetime, string stoname, string descr, string endtime, ref string vercode) { bool Flag = false; string SendKey = "mob_" + mobile; if (vercode.Length == 0) { Random rd = new Random(); vercode = rd.Next(100001, 999999).ToString(); } Flag = NetEaseNoteInterface.SendTemplateByNetEase("temp3", new string[1] { mobile }, new string[5] { savetime, stoname, descr, endtime, vercode }); if (Flag) { WebCache.Insert(SendKey, vercode, 5); } return(Flag); }
public static void Insert(string key, object value) { WebCache.Insert(key, value); }