public Task Handle(ProjectCreatedEvent notification, CancellationToken cancellationToken)
        {
            var @event = new ProjectCreateIntergrationEvent()
            {
                ProjectId  = notification.Project.Id,
                CreateTime = DateTime.Now,
                UserId     = notification.Project.UserId
            };

            _capBus.Publish("ProjectCreated", @event);
            return(Task.CompletedTask);
        }
        public async Task CreateRecommendProject(ProjectCreateIntergrationEvent @event)
        {
            //Rpc获取创建项目的基本信息
            //var baseUserInfo = await _userService.GetBaseUserInfoAsync(@event.UserId);
            //Rpc获取项目创建者的好友
            //var contacts= _contactService.GetContact(@event.UserId);
            //循环遍历添加项目推荐
            var recommend = new ProjectRecommend()
            {
                FromUserId     = @event.UserId,
                FromUserName   = "******",
                FromUserAvatar = "yanh",
                ProjectAvatar  = "test",
                ProjectId      = @event.ProjectId
            };

            _context.ProjectRecommends.Add(recommend);
            _context.SaveChanges();
        }