public int SignPoints(UserPointsInputDto pointDto) { Entitys.PointsLog log = new Entitys.PointsLog(); log.Score = pointDto.Score; log.UserId = pointDto.UserId; log.AddTime = DateTime.Now.ToString("yyyyMMdd"); if (this.pointsLogRepository.CreatePointsLog(log) > 0) { Entitys.UserDynamicInfo dyInfo = new Entitys.UserDynamicInfo(); dyInfo.TotalScore = pointDto.Score; dyInfo.UserId = pointDto.UserId; this.userDynamicInfoRepository.UpdatePointsScore(dyInfo); return(1); } return(0); }
public int AddPointsScore(UserPointsInputDto pointDto) { Entitys.UserLoginLog userLog = new Entitys.UserLoginLog(); userLog.LoginTime = DateTime.Now; userLog.LoginAddr = pointDto.Ip; userLog.UserId = pointDto.UserId; this.userLoginLogRepository.CreareLoginLog(userLog); //Entitys.PointsLog log = new Entitys.PointsLog(); //log.Score = pointDto.Score; //log.UserId = pointDto.UserId; //log.AddTime = DateTime.Now.ToString("yyyyMMdd"); //if (this.pointsLogRepository.CreatePointsLog(log) > 0) //{ // Entitys.UserDynamicInfo dyInfo = new Entitys.UserDynamicInfo(); // dyInfo.TotalScore = pointDto.Score; // dyInfo.UserId = pointDto.UserId; // this.userDynamicInfoRepository.UpdatePointsScore(dyInfo); // return 1; //} return(0); }