public void Test2() { try { List <WXMessageLog_EX> melist = mss.GetOrderTwoHour(); foreach (var l in melist) { if (!string.IsNullOrEmpty(l.FromUserName)) { mss.SaveWXMessageLog(new ORG_WXMessage_Log { CreateTime = DateTime.Now, EventID = l.ID, EventType = 2 }); string token = Token(mjuserid); var temp = new { first = new { value = "亲爱哒,距离您的小时光之旅还有2小时哦,我们再等着您的大驾光临啦~", color = "#173177" }, keyword1 = new { value = l.NAME, color = "#173177" }, keyword2 = new { value = "您的服务体验时间是" + l.BEGIN_DATE.ToString("yyyy.MM.dd HH:mm"), color = "#173177" }, remark = new { value = "\n" + "若计划有变,请找小星星修改预约时间哦~", color = "#CD0000" } }; string message = SendTemplateMessage(token, l.FromUserName, "FEBQLhjUm51Qvk8unkCrjKPMJ8Nw8DL8z6PDh8smtGU", "#FF0000", temp, WebUrl + "/wechat/spa/dingdan.aspx"); } } } catch (Exception ex) { mss.SaveLog(new WXLOG { CON = ex.Message + "," + ex.StackTrace, TIME = DateTime.Now }); } }