/// <summary> /// 测试发送 /// </summary> private void SetEventPush() { MarketPersonBLL bll = new MarketPersonBLL(Default.GetLoggingSession()); string EventID = "41D86F55613649539C480E697ADA9EBB"; string msgUrl = ConfigurationManager.AppSettings["push_weixin_msg_url"].Trim(); bool b = bll.SetEventPush(EventID, msgUrl, "1", true, true, true); }
/// <summary> /// 保存EventSend /// </summary> public string SaveEventSendData() { var service = new MarketEventBLL(CurrentUserInfo); var obj = new MarketEventEntity(); string content = string.Empty; string error = ""; var responseData = new ResponseData(); string key = string.Empty; string MarketEventID = string.Empty; bool chk = true; bool chkSMS = true; bool chkAPP = true; if (Request("data") != null && Request("data") != string.Empty) { key = Request("data").ToString().Trim(); } if (Request("MarketEventID") != null && Request("MarketEventID") != string.Empty) { MarketEventID = Request("MarketEventID").ToString().Trim(); } if (Request("chk") != null && Request("chk") != string.Empty) { chk = Convert.ToBoolean(Request("chk").ToString().Trim()); } if (Request("chkSMS") != null && Request("chkSMS") != string.Empty) { chkSMS = Convert.ToBoolean(Request("chkSMS").ToString().Trim()); } if (Request("chkAPP") != null && Request("chkAPP") != string.Empty) { chkAPP = Convert.ToBoolean(Request("chkAPP").ToString().Trim()); } obj = key.DeserializeJSONTo <MarketEventEntity>(); var eventObj = service.GetByID(MarketEventID); string msgUrl = ConfigurationManager.AppSettings["push_weixin_msg_url"].Trim(); MarketPersonBLL marketPersonBLL = new MarketPersonBLL(this.CurrentUserInfo); var sendFlag = marketPersonBLL.SetEventPush(MarketEventID, msgUrl, eventObj.SendTypeId, chk, chkSMS, chkAPP); // Update obj.MarketEventID = MarketEventID; service.Update(obj, false); responseData.success = sendFlag; responseData.msg = error; responseData.data = obj.MarketEventID; content = responseData.ToJSON(); return(content); }
/// <summary> /// 测试发送 /// </summary> /// <returns></returns> public string SetTestSendData() { var responseData = new ResponseData(); string content = string.Empty; string EventID = FormatParamValue(Request("eventId")); //活动标识 if (EventID == null || EventID.Trim().Length == 0) { responseData.success = false; responseData.msg = "活动标识不能为空"; return(responseData.ToJSON()); } MarketPersonBLL bll = new MarketPersonBLL(this.CurrentUserInfo); bool b = bll.SetEventPush(EventID, msgUrl, "1", true, true, true); responseData.success = true; responseData.msg = "测试发送成功"; content = responseData.ToJSON(); return(content); }