Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 리뷰 모아보기에서 누락되는 데이터 보일 수 있도록 수정 #250

Open
2 tasks done
yujiyea opened this issue Apr 20, 2024 · 0 comments
Open
2 tasks done
Assignees
Labels
🛠️ Refactor Code Refectoring

Comments

@yujiyea
Copy link
Collaborator

yujiyea commented Apr 20, 2024

⚠️ Issue

리뷰 모아보기는 방문날짜를 기준으로 정렬되어야 한다. 페이징 처리를 하면 ID(PK)값을 기준으로 방문날짜가 항상 내림차순인 것은 아니다. 즉, 커서 ID가 26이고 방문날짜가 4월 10일이지만 리뷰 ID가 27이고 방문날짜가 4월 2일인게 누락된다.
이를 해결하기 위해 페이징 처리(정렬된)한 응답값에서 가장 작은 리뷰 ID를 커서 ID로 정하는 것이 아니라 정렬되어 가장 마지막 순서에 있는 리뷰를 커서 ID로 지정한다. 이후, 페이징 처리는 커서 ID보다 작은 리뷰 ID이고 커서 ID의 방문날짜보다 같거나 이전 날짜인 리뷰만 가져오도록 한다.

✅ Todo

  • 페이징 처리 함수: 커서 ID보다 작고, 커서 ID의 방문날짜보다 같거나 이전 날짜의 리뷰를 페이징 처리하도록 수정
  • 응답값에 커서 ID 추가

🔗RelatedTo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ Refactor Code Refectoring
Projects
None yet
Development

No branches or pull requests

1 participant