/// <summary> /// 取消订阅 /// </summary> /// <param name="request"></param> /// <returns></returns> public ResponseRootMsg OnEvent_UnSubscribeRequest(RequestUnSubscribeEventMsg request) { var dbwxuser = databaseFixture.Db.WxUser.FindById(request.FromUserName); if (dbwxuser != null) { dbwxuser.Subscribe = 0; databaseFixture.Db.WxUser.Update(dbwxuser); } return(null); }
/// <summary> /// 转成取消订阅信息 /// </summary> /// <param name="rootMsg"></param> /// <param name="jObject"></param> /// <returns></returns> public static RequestUnSubscribeEventMsg ToUnSubscribeEventMsg(this RequestRootMsg rootMsg, JObject jObject) { RequestUnSubscribeEventMsg unSubscribeEventMsg = new RequestUnSubscribeEventMsg { CreateTime = rootMsg.CreateTime, FromUserName = rootMsg.FromUserName, ToUserName = rootMsg.ToUserName }; return(unSubscribeEventMsg); }
/// <summary> /// 取消订阅 /// </summary> /// <param name="request"></param> /// <returns></returns> protected virtual ResponseRootMsg OnEvent_UnSubscribeRequest(RequestUnSubscribeEventMsg request) { throw new NotImplementedException(); }
/// <summary> /// 取消订阅 /// </summary> /// <param name="request"></param> /// <returns></returns> protected override ResponseRootMsg OnEvent_UnSubscribeRequest(RequestUnSubscribeEventMsg request) { var res = _ruleService.OnEvent_UnSubscribeRequest(request); return(res ?? this.OnDefault(request)); }