Skip to content

Commit

Permalink
[feat] delete unnecessary logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kgy1008 committed Jul 14, 2024
1 parent acdaa8b commit a88fb8c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import org.hankki.hankkiserver.domain.store.repository.StoreRepository;
import org.springframework.stereotype.Component;

import java.util.Optional;

@Component
@RequiredArgsConstructor
public class StoreFinder {
Expand All @@ -28,8 +26,4 @@ protected Store findByIdWithHeartAndIsDeletedFalse(final Long id) {
return storeRepository.findByIdWithHeartAndIsDeletedFalse(id)
.orElseThrow(() -> new NotFoundException(StoreErrorCode.STORE_NOT_FOUND));
}

public Optional<Store> findStoreWithLatitudeAndLongitude(Double latitude, Double longitude) {
return storeRepository.findByPoint_LatitudeAndPoint_Longitude(latitude, longitude);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ public interface StoreRepository extends JpaRepository<Store, Long> {

@Query("select s from Store s join fetch s.hearts where s.id = :id and s.isDeleted = false")
Optional<Store> findByIdWithHeartAndIsDeletedFalse(Long id);

Optional<Store> findByPoint_LatitudeAndPoint_Longitude(Double latitude, Double longitude);
}

0 comments on commit a88fb8c

Please sign in to comment.