Skip to content

Commit 401f726

Browse files
committed
refactor(CheerService): 사용하지 않는 메서드 제거
1 parent 3ba6a46 commit 401f726

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/main/java/eatda/service/cheer/CheerService.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import java.util.List;
2121
import lombok.RequiredArgsConstructor;
2222
import org.springframework.data.domain.PageRequest;
23-
import org.springframework.data.domain.Pageable;
2423
import org.springframework.stereotype.Service;
2524
import org.springframework.transaction.annotation.Transactional;
2625

@@ -71,17 +70,6 @@ private CheersResponse toCheersResponse(List<Cheer> cheers) {
7170
.toList());
7271
}
7372

74-
@Transactional(readOnly = true)
75-
public CheersInStoreResponse getCheersByStoreId(Long storeId, int size) {
76-
Store store = storeRepository.getById(storeId);
77-
List<Cheer> cheers = cheerRepository.findAllByStoreOrderByCreatedAtDesc(store, Pageable.ofSize(size));
78-
79-
List<CheerInStoreResponse> cheersResponse = cheers.stream()
80-
.map(CheerInStoreResponse::new)
81-
.toList(); // TODO N+1 문제 해결
82-
return new CheersInStoreResponse(cheersResponse);
83-
}
84-
8573
@Transactional(readOnly = true)
8674
public CheersInStoreResponse getCheersByStoreId(Long storeId, int page, int size) {
8775
Store store = storeRepository.getById(storeId);

0 commit comments

Comments
 (0)