diff --git a/api-repo/src/main/kotlin/com/few/api/repo/dao/article/ArticleDao.kt b/api-repo/src/main/kotlin/com/few/api/repo/dao/article/ArticleDao.kt index a60ad9d29..edc38e1f7 100644 --- a/api-repo/src/main/kotlin/com/few/api/repo/dao/article/ArticleDao.kt +++ b/api-repo/src/main/kotlin/com/few/api/repo/dao/article/ArticleDao.kt @@ -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") } @@ -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") } diff --git a/api-repo/src/main/kotlin/com/few/api/repo/dao/member/MemberDao.kt b/api-repo/src/main/kotlin/com/few/api/repo/dao/member/MemberDao.kt index 3108e096e..52c2dfd16 100644 --- a/api-repo/src/main/kotlin/com/few/api/repo/dao/member/MemberDao.kt +++ b/api-repo/src/main/kotlin/com/few/api/repo/dao/member/MemberDao.kt @@ -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") } diff --git a/api-repo/src/main/kotlin/com/few/api/repo/dao/problem/ProblemDao.kt b/api-repo/src/main/kotlin/com/few/api/repo/dao/problem/ProblemDao.kt index 388984a17..b06ea88da 100644 --- a/api-repo/src/main/kotlin/com/few/api/repo/dao/problem/ProblemDao.kt +++ b/api-repo/src/main/kotlin/com/few/api/repo/dao/problem/ProblemDao.kt @@ -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) }