@@ -35,21 +35,24 @@ class MatchMapper(
3535
3636 val matchInfoList = matches.map { matchEntity ->
3737 val bettingInfo = bundleDto.bettings.find { it.matchId == matchEntity.id }
38+ val tempPointExpiredDate = matchEntity.endDate.plusMinutes(5 )
3839 val resultInfo = bettingInfo?.result?.let {
3940 MatchResultInfoDto (
4041 victoryTeamId = matchEntity.matchResult!! .victoryTeam.id,
4142 aTeamScore = matchEntity.matchResult!! .aTeamScore,
4243 bTeamScore = matchEntity.matchResult!! .bTeamScore,
4344 isPredictionSuccess = it.isPredicted,
44- earnedPoint = it.earnedPoint
45+ earnedPoint = it.earnedPoint,
46+ tempPointExpiredDate = tempPointExpiredDate,
4547 )
4648 } ? : matchEntity.matchResult?.let {
4749 MatchResultInfoDto (
4850 victoryTeamId = it.victoryTeam.id,
4951 aTeamScore = it.aTeamScore,
5052 bTeamScore = it.bTeamScore,
5153 isPredictionSuccess = null ,
52- earnedPoint = null
54+ earnedPoint = null ,
55+ tempPointExpiredDate = tempPointExpiredDate,
5356 )
5457 }
5558
@@ -106,13 +109,25 @@ class MatchMapper(
106109 )
107110 }
108111
112+ val tempPointExpiredDate = match.endDate.plusMinutes(5 )
113+
109114 val resultDto = bettingInfo?.result?.let {
110115 MatchResultInfoDto (
111116 victoryTeamId = match.matchResult!! .victoryTeam.id,
112117 aTeamScore = match.matchResult!! .aTeamScore,
113118 bTeamScore = match.matchResult!! .bTeamScore,
114119 isPredictionSuccess = it.isPredicted,
115- earnedPoint = it.earnedPoint
120+ earnedPoint = it.earnedPoint,
121+ tempPointExpiredDate = tempPointExpiredDate
122+ )
123+ } ? : match.matchResult?.let {
124+ MatchResultInfoDto (
125+ victoryTeamId = it.victoryTeam.id,
126+ aTeamScore = it.aTeamScore,
127+ bTeamScore = it.bTeamScore,
128+ isPredictionSuccess = null ,
129+ earnedPoint = null ,
130+ tempPointExpiredDate = tempPointExpiredDate,
116131 )
117132 }
118133
0 commit comments