예제 #1
0
 public override IResponseMessageBase OnEvent_UnsubscribeRequest(RequestMessageEvent_Unsubscribe requestMessage)
 {
     var responseMessage = base.CreateResponseMessage<ResponseMessageText>();
     responseMessage.Content = "有空再来";
     try
     {
         // 取消关注事件,下边做些逻辑
         UserService userService = new UserService();
         userService.UnSubscribeWeChatUser(requestMessage.FromUserName);
     }
     catch (Exception ex)
     {
         LogService.Log("用户取消关注失败, WeChatID = " + requestMessage.FromUserName, ex.ToString());
     }
     return responseMessage;
 }