Skip to content
Merged
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
Expand Up @@ -119,7 +119,7 @@ public String getNearbyPopularStoresForAi(ToolContext toolContext) {
public List<StoreListResponse> getNearbyStores(double latitude, double longitude, int page, int size) {
int limitedSize = Math.min(size, 100);
return storeRepository.findNearbyWithGist(
latitude, longitude, 5000.0,
latitude, longitude, 1000.0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

하드코딩된 반경 값 1000.0 대신 클래스 상수로 정의하여 관리하는 것을 권장합니다. 이를 통해 코드의 가독성을 높이고, 향후 요구사항 변경이나 성능 튜닝 시 값을 한곳에서 안전하게 변경할 수 있습니다.

추천 상수 정의 예시:

private static final double DEFAULT_NEARBY_RADIUS_METERS = 1000.0;
Suggested change
latitude, longitude, 1000.0,
latitude, longitude, DEFAULT_NEARBY_RADIUS_METERS,

PageRequest.of(page, limitedSize)
).stream().map(StoreListResponse::from).toList();
}
Expand Down
Loading