Beispiel #1
0
        /// <summary>
        /// 接收到(未关注的)客户的扫描事件
        /// </summary>
        /// <param name="context"></param>
        /// <param name="doc"></param>
        private void _OnEventCustomerScanMessage(HttpContext context, System.Xml.XmlDocument doc)
        {
//            <xml><ToUserName><![CDATA[toUser]]></ToUserName>
//<FromUserName><![CDATA[FromUser]]></FromUserName>
//<CreateTime>123456789</CreateTime>
//<MsgType><![CDATA[event]]></MsgType>
//<Event><![CDATA[subscribe]]></Event>
//<EventKey><![CDATA[qrscene_123123]]></EventKey>
//<Ticket><![CDATA[TICKET]]></Ticket>
//</xml>
            string toUserName   = doc.GetElementsByTagName("ToUserName")[0].InnerText;
            string fromUserName = doc.GetElementsByTagName("FromUserName")[0].InnerText;
            string createTime   = doc.GetElementsByTagName("CreateTime")[0].InnerText;
            string eventKey     = doc.GetElementsByTagName("EventKey")[0].InnerText;
            string ticket       = doc.GetElementsByTagName("Ticket")[0].InnerText;

            RequestEventCustomerScan rqMsg = new RequestEventCustomerScan();

            rqMsg.ToUserName   = toUserName;
            rqMsg.FromUserName = fromUserName;
            rqMsg.CreateTime   = new DateTime(long.Parse(createTime));
            rqMsg.EventKey     = eventKey;
            rqMsg.Ticket       = ticket;

            ResponseMessage rpMsg = OnEventCustomerScanMessage(rqMsg);

            SendResponseMessage(context, rpMsg, rqMsg);
        }
Beispiel #2
0
 public override ResponseMessage OnEventCustomerScanMessage(RequestEventCustomerScan requestEventCustomerScan)
 {
     throw new NotImplementedException();
 }
Beispiel #3
0
 /// <summary>
 /// 接收到非关注客户的扫描事件
 /// </summary>
 /// <param name="requestEventCustomerScan"></param>
 /// <returns></returns>
 public abstract ResponseMessage OnEventCustomerScanMessage(RequestEventCustomerScan requestEventCustomerScan);