Skip to content

Commit

Permalink
fix: 모임 질문 종료 조건 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
nahyeon99 committed Aug 4, 2024
1 parent 638b539 commit d44e561
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public MostInactiveMeetingQuestionListResponse findMostInactiveList(Long meeting
.leftJoin(meetingQuestion.memberAnswers, meetingAnswer).fetchJoin()
.where(
meetingQuestion.meeting.id.eq(meetingId),
meetingQuestion.question.isNotNull(),
inactiveCond()
)
.orderBy(orderDescByMeetingAnswerCount(), meetingQuestion.startTime.desc())
Expand All @@ -103,6 +104,7 @@ public FullInactiveMeetingQuestionListResponse findFullInactiveList(Long meeting
.leftJoin(meetingQuestion.question.questionImageFile, questionImageFile).fetchJoin()
.where(
meetingQuestion.meeting.id.eq(meetingId),
meetingQuestion.question.isNotNull(),
inactiveCond()
)
.orderBy(orderDescByMeetingAnswerCount(), meetingQuestion.startTime.desc())
Expand Down Expand Up @@ -154,7 +156,8 @@ private BooleanExpression activeCond() {
LocalDateTime now = LocalDateTime.now();
return meetingQuestion.startTime.loe(now)
.and(meetingQuestion.startTime.goe(now.minusHours(RESPONSE_TIME_LIMIT_HOURS)))
.and(isAnsweredByAllCond().not());
.and(isAnsweredByAllCond().not())
.and(meetingQuestion.question.isNotNull());
}

private BooleanExpression inactiveCond() {
Expand Down

0 comments on commit d44e561

Please sign in to comment.