Modify findQuiz enabled only on QuizRepositoryImpl
This commit is contained in:
@@ -36,6 +36,7 @@ public class QuizRepositoryImpl implements QuizRepositoryCustom {
|
|||||||
.offset(pageable.getOffset())
|
.offset(pageable.getOffset())
|
||||||
.limit(pageable.getPageSize())
|
.limit(pageable.getPageSize())
|
||||||
.where(qQuiz.answer.isNotNull())
|
.where(qQuiz.answer.isNotNull())
|
||||||
|
.where(qQuiz.isEnable.isTrue())
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
final long count = query.selectFrom(qQuiz)
|
final long count = query.selectFrom(qQuiz)
|
||||||
@@ -43,6 +44,7 @@ public class QuizRepositoryImpl implements QuizRepositoryCustom {
|
|||||||
.where(quizCategoriesIn(qQuiz, condition.getCategories()))
|
.where(quizCategoriesIn(qQuiz, condition.getCategories()))
|
||||||
.where(quizLevelsIn(qQuiz, condition.getLevels()))
|
.where(quizLevelsIn(qQuiz, condition.getLevels()))
|
||||||
.where(qQuiz.answer.isNotNull())
|
.where(qQuiz.answer.isNotNull())
|
||||||
|
.where(qQuiz.isEnable.isTrue())
|
||||||
.stream().count();
|
.stream().count();
|
||||||
|
|
||||||
return new PageImpl<>(quizList, pageable, count);
|
return new PageImpl<>(quizList, pageable, count);
|
||||||
|
|||||||
Reference in New Issue
Block a user