Esempio n. 1
0
 /// <summary>
 /// 客户通讯
 /// </summary>
 private void CustomerCommunicate()
 {
     if (IsCustomConnectExpire())
     {
         B_W_CustomerServiceConnection.AddServiceConnection(new CT_Wechat_CustomerServiceConnection()
         {
             CSC_AD_OpenId         = _AD_OpenId,
             CSC_CS_OpenId         = _x.FromUserName,
             CSC_Connection_dt     = DateTime.Now,
             CSC_Connection_Status = 1
         });
         B_W_Fans      _b_fan = new B_W_Fans();
         CT_Wechat_Fan _fan   = _b_fan.GetFans(_x.FromUserName);
         wechatHandle.SendCustom_text(_AD_OpenId, "@" + _fan.WF_NickName + ":" + _x.Content);
         B_W_CustomSservice _b_custom = new B_W_CustomSservice();
         _b_custom.AddCustomSservice(new CT_Wechat_CustomSservice()
         {
             WCS_FromOpenId = _x.FromUserName, WCS_ToOpenId = _AD_OpenId, WCS_Content = _x.Content, WM_CreateTime = wechatHandle.GetLocalTime(Convert.ToInt64(_x.CreateTime))
         });
         _b_custom.AddCustomSservice(_AD_OpenId, _x.FromUserName, _x.Content, 0);
     }
     else
     {
         try
         {
             Convert.ToInt32(_x.Content);
             CT_Wechat_Member _M_s = B_W_CT_Member.GetMember(_x.Content, 2);
             if (_M_s == null)
             {
                 wechatHandle.SendCustom_text(_x.FromUserName, "请你先选择推荐的顾问,再进行通话。");
                 wechatHandle.SendCustom_text(_x.FromUserName, B_W_TextMessage.GetMessage());
             }
             else
             {
                 B_W_CustomerServiceConnection.AddServiceConnection(new CT_Wechat_CustomerServiceConnection()
                 {
                     CSC_AD_OpenId         = _M_s.MB_OpenID,
                     CSC_CS_OpenId         = _x.FromUserName,
                     CSC_Connection_dt     = DateTime.Now,
                     CSC_Connection_Status = 1
                 });
                 wechatHandle.SendCustom_text(_x.FromUserName, _M_s.AU_Name + ":正在等待你的问题");
             }
         }
         catch
         {
             wechatHandle.SendCustom_text(_x.FromUserName, "请你先选择顾问,再进行通话。否则,你的消息我们仅作留言处理,不能及时回复你。");
             wechatHandle.SendCustom_text(_x.FromUserName, B_W_TextMessage.GetMessage());
             AddTrack();
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 通讯类型,顾问和客户
        /// </summary>
        private void IsCommunicatorType()
        {
            CT_Wechat_Member _M = B_W_CT_Member.GetMember(_x.FromUserName, 1);

            if (_M == null)
            {
                new CustomerControl(_x);
            }
            else
            {
                new AdviserControl(_x);
            }
        }