public Task <AsyncTaskResult> HandleAsync(MyParentRecommandAPasserEvent evnt) { if (evnt.ParentId != Guid.Empty) { return(_commandService.SendAsync( new AcceptChildUpdateOrderCommand(evnt.NewVipId, evnt.NewVipRole, evnt.GoodsCount, evnt.LeftAwardAmount, evnt.Level, evnt.UpdateOrderType) { AggregateRootId = evnt.ParentId })); } return(Task.FromResult(AsyncTaskResult.Success)); }
private void Handle(MyParentRecommandAPasserEvent evnt) { //修改直推角色,直推用户可能已经升级 if (_myRecommends.ContainsKey(evnt.UserId)) { _myRecommends[evnt.UserId].Role = evnt.UserRole; } //添加报单用户 针对非直推的情况,用户可能重复报单 if (_myRecommends.ContainsKey(evnt.NewVipId)) { _myRecommends[evnt.NewVipId].Role = evnt.NewVipRole; } else { _myRecommends.Add(evnt.NewVipId, new RecommandUserInfo(evnt.NewVipId, evnt.NewVipRole, evnt.Level)); } }