Skip to content

Commit

Permalink
Revert "test: 코루틴 테스트용 커밋 - tmp"
Browse files Browse the repository at this point in the history
This reverts commit e644791.
  • Loading branch information
belljun3395 committed Jan 13, 2025
1 parent e644791 commit 1998bd3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class ArticleDao(
suspend fun selectArticleContentsAsync(articleId: Long): SelectArticleContentsRecord =
dslContext
.select(
ArticleIfo.ARTICLE_IFO.ARTICLE_MST_ID.`as`(SelectArticleContentsRecord::articleId.name)
// ArticleIfo.ARTICLE_IFO.CONTENT.`as`(SelectArticleContentsRecord::content.name)
ArticleIfo.ARTICLE_IFO.ARTICLE_MST_ID.`as`(SelectArticleContentsRecord::articleId.name),
ArticleIfo.ARTICLE_IFO.CONTENT.`as`(SelectArticleContentsRecord::content.name)
).from(ArticleIfo.ARTICLE_IFO)
.where(ArticleIfo.ARTICLE_IFO.ARTICLE_MST_ID.eq(articleId))
.and(ArticleIfo.ARTICLE_IFO.DELETED_AT.isNull)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ package com.few.api.repo.dao.article.record

data class SelectArticleContentsRecord(
val articleId: Long,
) {
val content: String = ""
}
val content: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class BrowseArticlesUseCase(
val sortedArticles = updateAndSortArticleViews(articleMainCardRecords, articleViewsRecords)
val selectArticleContentsRecords = deferredResults.associateBy { it.articleId }
sortedArticles.forEach {
it.content = selectArticleContentsRecords[it.articleId]?.content ?: ""
it.content = selectArticleContentsRecords[it.articleId]?.content?.substring(0, 500) ?: ""
}

val articleUseCaseOuts: List<ReadArticleUseCaseOut> =
Expand Down

0 comments on commit 1998bd3

Please sign in to comment.