/// <summary>
        /// 用户关闭问题
        /// </summary>
        /// <param name="openid"></param>
        /// <returns></returns>
        private async Task <bool> Close(CustomerServiceConversationDto conversation)
        {
            if (conversation != null)
            {
                Logger.Info($"开始关闭问题 {conversation.Id}");
                conversation.EndTalkTime = DateTime.Now;
                conversation.State       = (int)CustomerServiceConversationState.Closed;
                await _customerServiceConversationAppService.Update(conversation);

                WebClient wc     = new WebClient();
                var       values = new NameValueCollection();
                values.Add("conversationId", conversation.Id.ToString()); //会话ID
                values.Add("FansClose", "1");                             //会话ID
                await wc.UploadValuesTaskAsync(JobConfig.AppSettings["AutoStopConversationUrl"], values);

                Logger.Info($"成功关闭问题 {conversation.Id}");
            }
            return(false);
        }
예제 #2
0
 public CreateOrEditCustomerServiceConversationViewModel(CustomerServiceConversationDto output)
 {
     output.MapTo(this);
 }