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

feat: GET /api/v1/workbooks/{workbookId}/articles/{articleId} 구현 #65

Merged
merged 30 commits into from
Jun 22, 2024

Conversation

belljun3395
Copy link
Collaborator

@belljun3395 belljun3395 commented Jun 21, 2024

🎫 연관 이슈

resolved: #59

💁‍♂️ PR 내용

  • GET /api/v1/workbooks/{workbookId}/articles/{articleId} 구현

🙏 작업

  • ArticleDao#selectWorkBookArticleRecord: 워크북 내에서 아티클의 Day 정보를 포함하여 조회합니다
  • 다른 정보의 경우 기존 구현을 활용하였습니다.

🙈 PR 참고 사항

6dd418f 커밋 이후로 작업을 확인하면 됩니다!

MAPPING_WORKBOOK_ARTICLE 조인 조건을 아래와 같이 PK를 사용하도록 설정하였습니다.
이렇게 해도 괜찮을까요...?
JOIN을 사용할 때 어떤 점을 고려하면 좋을지 궁금합니다.

.from(articleMst)
  .join(articleIfo)
  .on(articleMst.ID.eq(articleIfo.ARTICLE_MST_ID))
  .join(mappingWorkbookArticle)
  .on(mappingWorkbookArticle.WORKBOOK_ID.eq(workbookId))
  .and(mappingWorkbookArticle.ARTICLE_ID.eq(articleMst.ID))
  .where(articleMst.ID.eq(articleId))
  .fetchOneInto(SelectWorkBookArticleRecord::class.java)
  ?: throw IllegalArgumentException("cannot find $workbookId article record by articleId: $articleId")

📸 스크린샷

🤖 테스트 체크리스트

  • 체크 미완료
  • 체크 완료

@belljun3395 belljun3395 requested a review from hun-ca as a code owner June 21, 2024 02:24
@github-actions github-actions bot added the feature 새로운 기능을 만들 때 사용됩니다 label Jun 21, 2024
Copy link
Member

@hun-ca hun-ca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전 PR이랑 겹치는 내용도 많고 대체로 틀은 비슷하기 때문에 리뷰할건 없어보이네요!

# Conflicts:
#	api-repo/src/main/kotlin/com/few/api/repo/dao/article/ArticleDao.kt
#	api-repo/src/test/kotlin/com/few/api/repo/dao/article/ArticleDaoTest.kt
#	api-repo/src/test/kotlin/com/few/api/repo/dao/member/MemberDaoTest.kt
#	api-repo/src/test/kotlin/com/few/api/repo/dao/problem/ProblemDaoTest.kt
#	api/src/main/kotlin/com/few/api/domain/article/usecase/ReadArticleUseCase.kt
@belljun3395 belljun3395 merged commit be09bd6 into main Jun 22, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 새로운 기능을 만들 때 사용됩니다
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GET /api/v1/workbooks/{workbookId}/articles/{articleId} 구현
2 participants