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: 삭제되지 않은 결과 조회를 위해 isNull 조건 추가 #78

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ArticleDao(
.join(ArticleIfo.ARTICLE_IFO)
.on(ArticleMst.ARTICLE_MST.ID.eq(ArticleIfo.ARTICLE_IFO.ARTICLE_MST_ID))
.where(ArticleMst.ARTICLE_MST.ID.eq(articleId))
.and(ArticleMst.ARTICLE_MST.DELETED_AT.isNull)
.fetchOneInto(SelectArticleRecord::class.java)
?: throw IllegalArgumentException("cannot find article record by articleId: $articleId")
}
Expand Down Expand Up @@ -57,6 +58,7 @@ class ArticleDao(
.on(mappingWorkbookArticle.WORKBOOK_ID.eq(workbookId))
.and(mappingWorkbookArticle.ARTICLE_ID.eq(articleMst.ID))
.where(articleMst.ID.eq(articleId))
.and(articleMst.DELETED_AT.isNull)
.fetchOneInto(SelectWorkBookArticleRecord::class.java)
?: throw IllegalArgumentException("cannot find $workbookId article record by articleId: $articleId")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class MemberDao(
.from(Member.MEMBER)
.where(Member.MEMBER.ID.eq(writerId))
.and(Member.MEMBER.TYPE_CD.eq(1)) // todo fix after considering the type_cd
.and(Member.MEMBER.DELETED_AT.isNull)
.fetchOneInto(WriterRecord::class.java)
?: throw IllegalArgumentException("cannot find writer record by writerId: $writerId")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ProblemDao(
return dslContext.select()
.from(Problem.PROBLEM)
.where(Problem.PROBLEM.ARTICLE_ID.eq(articleId))
.and(Problem.PROBLEM.DELETED_AT.isNull)
.fetch()
.map { it[Problem.PROBLEM.ID] }
.let { ProblemIdsRecord(it) }
Expand Down
Loading