Skip to content
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
@@ -0,0 +1,14 @@
package kr.ac.kookmin.stream.common;

import java.util.List;

/**
* 앞의 몇 건과 전체 수. 홈처럼 "미리보기 N건 + 더보기"를 그리는 화면이 쓴다.
* <p>
* 커서({@link CursorSliceResult})나 페이지({@link PageResult})와 달리 이어서 더 읽지 않는다. 전체를 돌려주고
* 화면이 자르면 목록이 긴 회원의 홈에 이력 전체가 실리므로, 자르는 일을 조회가 맡고 전체 수를 함께 준다.
*
* @param content 미리보기 목록. 전체 수보다 적을 수 있다
*/
public record PreviewResult<T>(List<T> content, long totalCount) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[a] 리뷰 포인트 주신 PreviewResult를 core:common에 둔 것에 대한 의견이에요.

하나 더 두는 게 맞아 보여요.

  • 행사(core:domain:event)와 대여(core:domain:welfare)가 같이 쓰는데, 도메인 모듈끼리는 서로 의존하지 않으니(architecture.md 3절) 둘 곳은 core:common뿐이에요. 2-1절 표에도 core:common이 맡는 것으로 "페이지/커서 결과"가 있어서 그 옆에 놓이는 타입입니다
  • PageResult로 대신하면 page·size·totalPage가 뜻 없는 값으로 나가요. 목록과 전체 수를 서비스 메서드 둘로 나누면, 조회 조합 UseCase에는 트랜잭션을 걸지 않으니(coding-style.md 2-9절) getUpcomingAppliedEvents에서 한 스냅샷으로 묶어 두신 게 풀립니다
  • 필드 이름이 PageResult의 content·totalCount와 같아서 프론트가 같은 이름으로 읽을 수 있는 것도 좋아요

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0519ac7 말씀하신 대로 목록과 전체 수를 서비스 메서드 둘로 두면 2-9절 때문에 한 스냅샷 보장이 풀려서, 저장소에서 countQuery로 한 번에 읽고 readOnly 트랜잭션을 뺐습니다. PreviewResult는 그대로 core:common에 두었습니다.

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.Optional;
import kr.ac.kookmin.stream.common.PageOffset;
import kr.ac.kookmin.stream.common.PageResult;
import kr.ac.kookmin.stream.common.PreviewResult;
import kr.ac.kookmin.stream.event.domain.event.domain.Event;
import kr.ac.kookmin.stream.event.domain.event.domain.EventCursor;
import kr.ac.kookmin.stream.event.domain.event.domain.EventQuestion;
Expand Down Expand Up @@ -70,6 +71,19 @@ List<Event> findPublishedSlice(
LocalDateTime now
);

/**
* 회원이 신청한 행사 중 아직 끝나지 않은 것을 행사 시작이 임박한 순으로 {@code limit}건까지 조회한다.
* 취소한 신청과 삭제된 행사는 뺀다. 여러 날에 걸친 행사는 마지막 날까지 남는다.
* <p>
* 거르는 조건에 회원과 신청 상태가 들어가지만 돌려주는 것은 행사다. 신청 조건으로 행사를 좁히는 조회는
* {@link #findPublishedSlice}의 정원 판정처럼 이 저장소가 맡는다.
*
* 홈이 "N건 더보기"를 그려야 해서 앞의 {@code limit}건과 함께 전체 수를 준다.
*
* @param startOfToday 오늘 0시. 종료 일시를 시각이 아니라 날짜로 견준다 — 오늘 끝나는 행사도 보여줘야 한다
*/
PreviewResult<Event> findUpcomingAppliedEvents(Long memberId, LocalDateTime startOfToday, int limit);

/**
* 게시되고 삭제되지 않은 행사 중 시작 일시가 {@code [from, to)}인 행사. 행사 전날 알림 대상을 고를 때 쓴다.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package kr.ac.kookmin.stream.event.domain.event.service;

import kr.ac.kookmin.stream.common.CursorSliceResult;
import kr.ac.kookmin.stream.common.PreviewResult;
import kr.ac.kookmin.stream.event.domain.event.domain.Event;
import kr.ac.kookmin.stream.event.domain.event.domain.EventApplicationCursor;
import kr.ac.kookmin.stream.event.domain.event.domain.EventApplicationDetail;
import kr.ac.kookmin.stream.event.domain.event.domain.EventApplicationForm;
Expand All @@ -24,6 +26,16 @@ CursorSliceResult<EventApplicationSummary> getMyApplications(
int size
);

/**
* 회원이 신청한 행사 중 아직 끝나지 않은 것을 행사 시작 임박순으로 {@code limit}건까지, 전체 수와 함께 조회한다.
* <p>
* 홈이 "신청한 행사 · N건"과 미리보기 두 건을 그리는 데 쓴다. 신청 내역 화면이 쓰는
* {@link #getMyApplications}는 신청 시각 최신순 커서 조회라 전체 수를 주지 않고, 행사일도 담지 않는다.
* 취소한 신청과 끝난 행사는 빼고 행사 자체를 돌려준다 — 화면이 어떤 필드를 쓸지는 응답이 고른다. 진행 중인
* 행사는 남으므로 "아직 열리지 않은 것"이 아니다.
*/
PreviewResult<Event> getUpcomingAppliedEvents(Long memberId, int limit);

EventApplicationDetail getMyApplication(Long applicationId, Long memberId);

void cancelApplication(Long applicationId, Long memberId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package kr.ac.kookmin.stream.event.domain.event.service.impl;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
Expand All @@ -8,6 +9,7 @@
import kr.ac.kookmin.stream.common.BusinessException;
import kr.ac.kookmin.stream.common.CursorSliceResult;
import kr.ac.kookmin.stream.common.OutboxWriter;
import kr.ac.kookmin.stream.common.PreviewResult;
import kr.ac.kookmin.stream.common.event.EventApplicationCanceled;
import kr.ac.kookmin.stream.common.event.EventApplied;
import kr.ac.kookmin.stream.event.domain.event.domain.Event;
Expand Down Expand Up @@ -169,4 +171,10 @@ private List<EventApplicationAnswer> toAnswers(Long applicationId, EventApplyCom
))
.toList();
}

@Override
public PreviewResult<Event> getUpcomingAppliedEvents(Long memberId, int limit) {
// 오늘 끝나는 행사는 이미 지났어도 "오늘"로 보여줘야 하므로 시각이 아니라 날짜로 거른다
return eventRepository.findUpcomingAppliedEvents(memberId, LocalDate.now().atStartOfDay(), limit);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package kr.ac.kookmin.stream.event.domain.locker.service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand All @@ -16,6 +17,12 @@ public interface LockerService {
*/
Optional<LockerPeriod> getCurrentPeriod();

/**
* 주어진 운영 회차 중 지금 신청할 수 있는 것을 신청 마감 임박순으로 조회한다.
* 미게시·삭제된 회차와 신청 기간이 아닌 회차는 빠진다.
*/
List<LockerPeriod> getApplicablePeriods(Collection<Long> lockerPeriodIds);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[a] 리뷰 포인트 주신 getApplicablePeriods가 식별자를 받는 것, 신청 가능한 행사 조회가 이 PR에 없는 것에 대한 의견이에요.

식별자를 받는 모양 좋아 보여요. 홈은 노출 설정에서 회차를 이미 알고 있고, 신청 내역(LockerApplicationServiceImpl.java:78)이 쓰던 findPublishedPeriodsByIds를 그대로 써서 저장소에 쿼리를 더하지 않아도 됐어요.

비대칭은 이미 풀린 것 같아요. 본문 한계에 적어 주신 대로 #200에서 EventService.getApplicableEvents(Collection<Long>)가 생겨 행사도 식별자를 받습니다. 리뷰 포인트 설명("행사는 getPublishedEvents를 쓰고 사물함만 식별자를 받는다")은 그 전 설계 기준이라 본문만 맞춰 주시면 좋겠습니다.

신청 가능한 행사 조회를 #200에 두신 것도 괜찮아 보여요. findPublishedSlice는 모집 상태·커서로만 거르는 학생 목록 쿼리라, 식별자 조건을 끼우기보다 따로 두는 게 맞는 것 같습니다.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

본문 리뷰 포인트에서 비대칭 설명을 빼고, 신청 가능한 행사 조회를 #200에 둔 경위로 고쳐 적었습니다. 지적해 주신 대로 그 설명이 getApplicableEvents가 생기기 전 기준이었습니다.


/**
* 운영 회차의 구역별 전체/선택 가능 사물함 수와 표시 상태를 조회한다.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package kr.ac.kookmin.stream.event.domain.locker.service.impl;

import java.time.LocalDateTime;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -33,6 +35,16 @@ public Optional<LockerPeriod> getCurrentPeriod() {
return lockerRepository.findCurrentPublishedPeriod(LocalDateTime.now());
}

@Override
public List<LockerPeriod> getApplicablePeriods(Collection<Long> lockerPeriodIds) {
// 신청과 같은 기준을 써야 하므로 기간 판정은 LockerPeriod의 계산을 그대로 쓴다
LocalDateTime now = LocalDateTime.now();
return lockerRepository.findPublishedPeriodsByIds(lockerPeriodIds).stream()
.filter(period -> period.isApplyOpen(now))
.sorted(Comparator.comparing(LockerPeriod::getApplyEndAt).thenComparing(LockerPeriod::getId))
.toList();
}

@Override
@Transactional(readOnly = true)
public List<LockerSectionSummary> getSections(Long lockerPeriodId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import kr.ac.kookmin.stream.common.CursorSliceResult;
import kr.ac.kookmin.stream.common.PageOffset;
import kr.ac.kookmin.stream.common.PageResult;
import kr.ac.kookmin.stream.common.PreviewResult;
import kr.ac.kookmin.stream.event.domain.event.domain.Event;
import kr.ac.kookmin.stream.event.domain.event.domain.EventApplication;
import kr.ac.kookmin.stream.event.domain.event.domain.EventApplicationAnswer;
Expand Down Expand Up @@ -257,6 +258,12 @@ public List<EventApplication> findSliceByMemberId(
throw new UnsupportedOperationException();
}

@Override
public PreviewResult<Event> findUpcomingAppliedEvents(
Long memberId, LocalDateTime startOfToday, int limit) {
throw new UnsupportedOperationException();
}

@Override
public Optional<EventApplication> findByIdAndMemberId(
Long applicationId, Long memberId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Optional;
import kr.ac.kookmin.stream.common.PageOffset;
import kr.ac.kookmin.stream.common.PageResult;
import kr.ac.kookmin.stream.common.PreviewResult;
import kr.ac.kookmin.stream.event.domain.event.domain.Event;
import kr.ac.kookmin.stream.event.domain.event.domain.EventCursor;
import kr.ac.kookmin.stream.event.domain.event.domain.EventQuestion;
Expand Down Expand Up @@ -87,6 +88,11 @@ public List<Event> findAllByIds(List<Long> eventIds) {
throw new UnsupportedOperationException();
}

@Override
public PreviewResult<Event> findUpcomingAppliedEvents(Long memberId, LocalDateTime startOfToday, int limit) {
throw new UnsupportedOperationException();
}

@Override
public Optional<Event> findPublishedById(Long id) {
throw new UnsupportedOperationException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public interface FeedbackRepository {
PageResult<Feedback> searchByKeyword(
int year, int round, String keyword, List<Long> memberIds, PageOffset pageOffset);

// 한 회원이 작성한 질문 수(연도·회차 무관)
long countByMemberId(Long memberId);

// 회차별 질문 수·답변 수 집계. year가 null이면 전체 연도. 질문이 없는 회차는 결과에 포함되지 않는다
List<FeedbackCount> findCountsByYear(Integer year);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public interface FeedbackService {
// 회차는 현재 열려 있는 회차로 서버가 자동 배정한다
Feedback create(Long memberId, String question);

/** 회원이 작성한 질문 수. 연도·회차를 가리지 않는 누적이다. */
long countByMemberId(Long memberId);

// 회차가 하나라도 존재했던 연도 목록(최신순)
List<Integer> getAvailableYears();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public Feedback create(Long memberId, String question) {
Feedback.create(openRound.getYear(), openRound.getRound(), question, memberId, now));
}

@Override
public long countByMemberId(Long memberId) {
return feedbackRepository.countByMemberId(memberId);
}

@Override
public List<Integer> getAvailableYears() {
return feedbackRoundRepository.findDistinctYears();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public interface RentalHistoryRepository {
*/
List<RentalHistory> findAllByMemberId(Long memberId, RentalStatus status);

/** 회원의 대여 이력 중 주어진 상태들 중 하나인 것. */
List<RentalHistory> findAllByMemberIdAndStatusIn(Long memberId, Collection<RentalStatus> statuses);

/** 모든 회원의 대여 이력 중 주어진 상태들 중 하나인 것. 반납 알림 대상을 고를 때 쓴다. */
List<RentalHistory> findAllByStatusIn(Collection<RentalStatus> statuses);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.time.LocalDateTime;
import java.util.List;
import kr.ac.kookmin.stream.common.PreviewResult;
import kr.ac.kookmin.stream.welfare.domain.rental.domain.Item;
import kr.ac.kookmin.stream.welfare.domain.rental.domain.RentalHistory;
import kr.ac.kookmin.stream.welfare.domain.rental.domain.RentalRecord;
Expand All @@ -22,6 +23,13 @@ public interface RentalHistoryService {
*/
List<RentalRecord> getReturnRequiredRentals(Long memberId);

/**
* 회원이 지금 빌려 간 물품을 반납 기한 임박순(같으면 식별자 오름차순)으로 {@code limit}건까지, 전체 수와 함께
* 조회한다. 기한이 지난 대여가 가장 앞에 온다. 반납을 신청했어도 물건은 손에 있으므로 포함한다.
* 반납 정책이 없는 대여는 기한을 계산할 수 없어 제외한다.
*/
PreviewResult<RentalRecord> getActiveRentals(Long memberId, int limit);

/**
* 모든 회원의 반납해야 하는 대여를 조회한다. 반납 기한 임박·연체 알림 대상을 고를 때 쓴다.
* 반납 정책이 없는 물품의 대여는 기한을 계산할 수 없어 제외한다.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package kr.ac.kookmin.stream.welfare.domain.rental.service.impl;

import java.time.LocalDateTime;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import kr.ac.kookmin.stream.common.BusinessException;
import kr.ac.kookmin.stream.common.PreviewResult;
import kr.ac.kookmin.stream.welfare.domain.rental.domain.Item;
import kr.ac.kookmin.stream.welfare.domain.rental.domain.RentalErrorCode;
import kr.ac.kookmin.stream.welfare.domain.rental.domain.RentalHistory;
Expand Down Expand Up @@ -38,6 +40,21 @@ public List<RentalRecord> getReturnRequiredRentals(Long memberId) {
.toList();
}

@Override
public PreviewResult<RentalRecord> getActiveRentals(Long memberId, int limit) {
// 반납 기한은 물품 정책으로 계산하는 값이라 DB에서 정렬할 수 없다. 기한 오름차순이면 기한이 지난 대여가
// 먼저 오고 그 뒤는 남은 시간이 적은 순이다. 기한이 같을 때는 식별자로 순서를 고정한다 — 조회 쿼리에
// 정렬이 없어, 두지 않으면 미리보기에 무엇이 실릴지가 DB가 준 순서에 달린다
List<RentalRecord> active = toRecords(rentalHistoryRepository
.findAllByMemberIdAndStatusIn(memberId, RentalStatus.awaitingReturnStatuses())).stream()
.filter(RentalRecord::isReturnRequired)
.sorted(Comparator.comparing(RentalRecord::dueAt)
.thenComparing(rentalRecord -> rentalRecord.history().getId()))
.toList();

return new PreviewResult<>(active.stream().limit(limit).toList(), active.size());
}

// 반납 기한 임박·연체 알림 대상을 고를 때 쓴다.
@Override
public List<RentalRecord> getAllReturnRequiredRentals() {
Expand Down
5 changes: 4 additions & 1 deletion docs/conventions/coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,17 @@ public final class ApiResponse<T> {
| --- | --- | --- |
| 커서/슬라이스 | 무한 스크롤 등 다음 페이지 여부 + 커서만 필요 | `CursorSliceResult<T>` / `CursorSliceResponse<T>` |
| 오프셋 | 페이지 번호·전체 개수·전체 페이지 필요 | `PageResult<T>` / `PageResponse<T>` |
| 미리보기 | 홈처럼 앞의 몇 건과 전체 수만 필요하고 이어서 더 읽지 않음 | `PreviewResult<T>` / `PreviewResponse<T>` |

- 커서 기반 응답 필드는 항상 `content`/`hasNext`/`nextCursor`로 통일한다.
- 목록 필드명은 세 방식 모두 `content`로 통일한다. 커서 기반은 여기에 `hasNext`/`nextCursor`를 더한다.
- 미리보기는 자르는 일을 조회가 맡는다. 전체를 돌려주고 화면이 자르면 목록이 긴 회원의 홈에 이력 전체가 실린다.
- `nextCursor`는 **클라이언트에게 불투명한 문자열**이다. 정렬 키가 여러 개인 keyset 커서를 담아야 하므로 도메인이 `{Domain}Cursor` record로 정렬 키와 그 문자열 표현(`format()`/`from(String)`)을 소유하고, Base64 URL-safe 인코딩은 웹 계층에서 `CursorCodec`(`api:common-api`)으로 처리한다.

```java
// core:common
public record CursorSliceResult<T>(List<T> content, boolean hasNext, String nextCursor) {}
public record PageResult<T>(List<T> content, int page, int size, long totalCount, int totalPage) {}
public record PreviewResult<T>(List<T> content, long totalCount) {}
```

### 2-5. JPA Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,46 @@ List<EventJpaEntity> findPublishedSlice(
AND e.applyEndAt < :to
""")
List<EventJpaEntity> findPublishedApplyEndingBetween(@Param("from") LocalDateTime from, @Param("to") LocalDateTime to);

/**
* 회원이 신청한 행사 중 아직 끝나지 않은 것. 행사와 신청은 FK로 묶여 있지 않아 식별자로 직접 잇는다.
* 홈 미리보기용이라 정렬은 행사 시작 임박순이다.
* <p>
* 신청을 JOIN하지 않고 {@code EXISTS}로 거른다. (행사, 회원) 유니크가 없어 유효 신청이 두 건 생길 수 있는데,
* JOIN이면 같은 행사가 신청 수만큼 복제된다. 신청했는지만 알면 되므로 존재 여부로 본다.
* <p>
* 종료 일시로 거르므로 여러 날에 걸친 행사는 마지막 날까지 남는다. {@code event_end_at}이 NULL인 기존 행은
* 시작 일시로 대신한다.
*
* @param startOfToday 오늘 0시. 시각이 아니라 날짜로 거른다 — 오늘 끝나는 행사는 이미 지났어도 보여줘야 한다
*/
@Query(
value = """
SELECT e FROM EventJpaEntity e
WHERE e.isDeleted = false
AND COALESCE(e.eventEndAt, e.eventStartAt) >= :startOfToday
AND EXISTS (
SELECT a.id FROM EventApplicationJpaEntity a
WHERE a.eventId = e.id
AND a.memberId = :memberId
AND a.status = :appliedStatus)
ORDER BY e.eventStartAt ASC, e.id ASC
""",
countQuery = """
SELECT COUNT(e) FROM EventJpaEntity e
WHERE e.isDeleted = false
AND COALESCE(e.eventEndAt, e.eventStartAt) >= :startOfToday
AND EXISTS (
SELECT a.id FROM EventApplicationJpaEntity a
WHERE a.eventId = e.id
AND a.memberId = :memberId
AND a.status = :appliedStatus)
"""
)
Page<EventJpaEntity> findUpcomingAppliedEvents(
@Param("memberId") Long memberId,
@Param("appliedStatus") EventApplicationStatus appliedStatus,
@Param("startOfToday") LocalDateTime startOfToday,
Pageable pageable
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.Optional;
import kr.ac.kookmin.stream.common.PageOffset;
import kr.ac.kookmin.stream.common.PageResult;
import kr.ac.kookmin.stream.common.PreviewResult;
import kr.ac.kookmin.stream.db.common.LikePatterns;
import kr.ac.kookmin.stream.event.domain.event.domain.Event;
import kr.ac.kookmin.stream.event.domain.event.domain.EventApplicationStatus;
Expand Down Expand Up @@ -115,6 +116,18 @@ public List<Event> findPublishedSlice(
).stream().map(EventJpaEntity::toDomain).toList();
}

@Override
public PreviewResult<Event> findUpcomingAppliedEvents(Long memberId, LocalDateTime startOfToday, int limit) {
Page<EventJpaEntity> result = eventJpaRepository.findUpcomingAppliedEvents(
memberId, EventApplicationStatus.APPLIED, startOfToday, Pageable.ofSize(limit)
);

return new PreviewResult<>(
result.getContent().stream().map(EventJpaEntity::toDomain).toList(),
result.getTotalElements()
);
}

@Override
public List<Event> findPublishedStartingBetween(LocalDateTime from, LocalDateTime to) {
return eventJpaRepository.findPublishedStartingBetween(from, to).stream().map(EventJpaEntity::toDomain).toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public Optional<LockerPeriod> findCurrentPublishedPeriod(LocalDateTime at) {

@Override
public List<LockerPeriod> findPublishedPeriodsByIds(Collection<Long> lockerPeriodIds) {
if (lockerPeriodIds.isEmpty()) {
return List.of();
}
return lockerPeriodJpaRepository.findAllByIdInAndIsPublishedTrueAndIsDeletedFalse(lockerPeriodIds).stream()
.map(LockerPeriodJpaEntity::toDomain)
.toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Page<FeedbackJpaEntity> searchByKeyword(
Pageable pageable
);

long countByCreatedByAndIsDeletedFalse(Long createdBy);

// COUNT(f.answer)는 answer가 NULL인 행을 세지 않으므로 그대로 "답변이 작성된 수"가 된다.
// 생성자 인자는 이름이 아니라 순서로 들어가므로 질문 수·답변 수 순서를 FeedbackCountProjection과 맞춘다
@Query("""
Expand Down
Loading