public async Task <IResponseMessageBase> InCustomer(int mpid, IRequestMessageBase request)
        {
            if (await IsAsking(mpid, request.FromUserName))
            {
                return(request.CreateResponseMessage <ResponseMessageNoResponse>());
            }
            var text = await _customerServiceResponseTextAppService.GetCustomerDefaultResponseString(mpid);

            await SendCustomerText(mpid, request.FromUserName, text);

            if (await _customerServiceResponseTextAppService.CheckIsWorkingTime(mpid))
            {
                return(request.CreateResponseMessage <ResponseMessageTransfer_Customer_Service>());
            }
            else
            {
                return(request.CreateResponseMessage <ResponseMessageNoResponse>());
            }
        }
        public async Task <IResponseMessageBase> InCustomer(int mpid, IRequestMessageBase request)
        {
            Logger.Info($"开始接入客服 {request.FromUserName}");

            if (await IsAsking(mpid, request.FromUserName))
            {
                Logger.Info($"接入客服 正在会话中无需接入 {request.FromUserName}");
                return(request.CreateResponseMessage <ResponseMessageNoResponse>());
            }
            var text = await _customerServiceResponseTextAppService.GetCustomerDefaultResponseString(mpid);

            await SendCustomerText(mpid, request.FromUserName, text);

            //推送接入问候语
            if (await _customerServiceResponseTextAppService.CheckIsWorkingTime(mpid))
            {
                Logger.Info($"开始接入客服 工作时间 {request.FromUserName}");
                FansMessageDto msgDto = new FansMessageDto {
                    MpID = mpid, OpenID = request.FromUserName
                };

                _backgroundJobManager.Enqueue <CustomerQuestionJoin, FansMessageDto>(msgDto);//接入机制

                #region 原代码
                //                var faninfo = await GetFan(mpid, request.FromUserName);
                //                if (faninfo != null)
                //                {
                //                    Logger.Info($"开始调用客服接入机制");
                //#warning 此处需要增加自动接入客服的机制,目前全部丢人待接入列表

                //                    var customer = await _customerServiceOnlineAppService.GetAutoJoinCustomer(mpid);
                //                    if (customer == null)//微客服坐席已满,进入等待队列
                //                    {
                //                        Logger.Info($"进入等待队列,开始创建等待会话");
                //                        var conversation = await _customerServiceConversationAppService.Create(new CustomerServiceConversationDto()
                //                        {
                //                            FanOpenId = request.FromUserName,
                //                            FanId = faninfo.Id,
                //                            MpID = mpid,
                //                            State = (int)CustomerServiceConversationState.Wait,
                //                            HeadImgUrl = faninfo.HeadImgUrl,
                //                            NickName = faninfo.NickName
                //                        });
                //                        Logger.Info($"进入等待队列,创建等待会话成功,开始记录缓存");
                //                        await _cacheManager.GetCache(AppConsts.Cache_FanOpenId2Conversation).SetAsync(request.FromUserName, conversation);
                //                        await _cacheManager.GetCache(AppConsts.Cache_Kf_FanOpenId2Conversation).RemoveAsync(request.FromUserName);

                //                        #region 推送消息给客服???
                //                        Logger.Info($"进入等待队列,创建等待会话成功,记录缓存成功,推送等待人数");
                //                        WebClient wc = new WebClient();
                //                        await wc.UploadValuesTaskAsync(_signalrCustomerService.SetUnConnectNoticeUrl, null);
                //                        #endregion
                //                    }
                //                    else
                //                    {
                //                        Logger.Info($"分配到自动接入客服:{JsonConvert.SerializeObject(customer)}");
                //                        #region 创建客服会话
                //                        var conversation = await _customerServiceConversationAppService.Create(new CustomerServiceConversationDto()
                //                        {
                //                            FanOpenId = request.FromUserName,
                //                            FanId = faninfo.Id,
                //                            MpID = mpid,
                //                            State = (int)CustomerServiceConversationState.Asking,
                //                            HeadImgUrl = faninfo.HeadImgUrl,
                //                            NickName = faninfo.NickName,
                //                            CustomerId = customer.Id,
                //                            CustomerOpenId = customer.OpenID,
                //                            StartTalkTime = DateTime.Now,
                //                            LastModificationTime = DateTime.Now
                //                        });
                //                        await _cacheManager.GetCache(AppConsts.Cache_FanOpenId2Conversation).SetAsync(request.FromUserName, conversation);
                //                        await _cacheManager.GetCache(AppConsts.Cache_Kf_FanOpenId2Conversation).RemoveAsync(request.FromUserName);
                //                        #endregion
                //                    }
                //                }
                #endregion

                return(request.CreateResponseMessage <ResponseMessageNoResponse>());
            }
            else
            {
                Logger.Info($"开始接入客服 休息时间 {request.FromUserName}");
                return(request.CreateResponseMessage <ResponseMessageNoResponse>());
            }
        }