issues
search
SOTATER
/
back-end
3
stars
0
forks
source link
bugfix: match update error fix
#45
Closed
charlielee921
closed
1 year ago
charlielee921
commented
1 year ago
match update시 match summoners item 테이블에 items list가 entity와 맞지 않는 문제
기존 의도가 list 형태에 mapping되는 것이었더라도 item의 수가 static하기 때문에 큰 문제가 없을 것이라 판단
match update시 로직 개선
기존에 latast match를 가져올때 match repo에서 가져오고 있었는데 match entity에서는 puuid를 저장하지 않아서 findByPuuid가 불가능한 상황이었음
puuid를 저장하고 있는 match summoner repo를 이용함
riot api에서 match를 가져올 때 (최근게임,...오래된게임)순으로 가져오는데 여러번 가져올 경우 latest match를 가져올 수 없는 상황이었음
riot api에서 가져온 match들을 reverse하여 (오래된게임,...최근게임)순으로 저장하고, first game를 조회하지 않고 last game을 조회하도록 변경하여 해결
match update시 match summoners 테이블에서 puuid가 summoners를 reference하면 모든 summoner들이 저장되어있어야 해서 reference를 제거함
eddy-kor-92
commented
1 year ago
File
Coverage [31.9%]
:x:
MatchService.kt
33.69%
:x:
MatchSummonerRepositoryImpl.kt
0%
:x:
Total Project Coverage
34.61%
:x: