Skip to content

Commit bd1b60c

Browse files
committed
[refac] change method names
1 parent 2d38d36 commit bd1b60c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/java/org/hankki/hankkiserver/api/store/service/StoreFinder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ protected Store findByIdWhereDeletedIsFalse(Long id) {
2222
.orElseThrow(() -> new NotFoundException(StoreErrorCode.STORE_NOT_FOUND));
2323
}
2424

25-
protected Store findStoreByIdWithHeart(Long id) {
26-
return storeRepository.findStoreByIdWithHeart(id)
25+
protected Store findByIdWithHeartAndIsDeletedFalse(Long id) {
26+
return storeRepository.findByIdWithHeartAndIsDeletedFalse(id)
2727
.orElseThrow(() -> new NotFoundException(StoreErrorCode.STORE_NOT_FOUND));
2828
}
2929
}

src/main/java/org/hankki/hankkiserver/api/store/service/StoreQueryService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public StoreThumbnailResponse getStoreThumbnail(Long id) {
2929
@Transactional(readOnly = true)
3030
public StoreGetResponse getStoreInformation(Long id) {
3131

32-
Store store = storeFinder.findStoreByIdWithHeart(id);
32+
Store store = storeFinder.findByIdWithHeartAndIsDeletedFalse(id);
3333

3434
return StoreGetResponse.of(store,
3535
isLiked(id, store),

src/main/java/org/hankki/hankkiserver/domain/store/repository/StoreRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ public interface StoreRepository extends JpaRepository<Store, Long> {
1111
Optional<Store> findByIdAndIsDeletedIsFalse(Long id);
1212

1313
@Query("select s from Store s join fetch s.hearts where s.id = :id and s.isDeleted = false")
14-
Optional<Store> findStoreByIdWithHeart(Long id);
14+
Optional<Store> findByIdWithHeartAndIsDeletedFalse(Long id);
1515
}

0 commit comments

Comments
 (0)