public void AddUserRecommend(UserRecommendInputDto input) { int id = this._userRecommendReposity.AddRecommend(input.MapTo <Entitys.UserRecommend>()); if (id >= 1) { Entitys.PointsLog pointLog = new Entitys.PointsLog(); pointLog.FK_ID = id.ToString(); pointLog.UserId = input.RecommenderId; pointLog.SourceType = 1; pointLog.Score = input.Score; this._pointsLogRepository.InvitAddPoints(pointLog); Entitys.UserDynamicInfo dyInfo = new Entitys.UserDynamicInfo(); dyInfo.TotalScore = input.Score; dyInfo.UserId = input.RecommenderId; this._userDynamicInfoRepository.UpdatePointsScore(dyInfo); } }