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
2 changes: 1 addition & 1 deletion k6/05-store-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const options = {
},
};

const CATEGORIES = ['KOREAN', 'JAPANESE', 'CHINESE', 'WESTERN', 'CAFE'];
const CATEGORIES = ['KOREAN', 'JAPANESE', 'CHINESE', 'WESTERN', 'DESSERT'];
const DISTRICTS = ['GANGNAM', 'MAPO', 'JONGNO', 'YONGSAN', 'SEONGDONG'];

export default function () {
Expand Down
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, 1000.0,
latitude, longitude, 3000.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

ν˜„μž¬ getNearbyStores λ©”μ„œλ“œμ—μ„œ 검색 반경으둜 3000.0 λ―Έν„°λ₯Ό 직접 ν•˜λ“œμ½”λ”©ν•˜μ—¬ μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. 이 값은 getNearbyPopularStoresForAi λ©”μ„œλ“œ(101라인)μ—μ„œλ„ 3000μ΄λΌλŠ” κ°’μœΌλ‘œ μ€‘λ³΅λ˜μ–΄ μ‚¬μš©λ˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

이처럼 λ™μΌν•œ 의미λ₯Ό κ°€μ§„ 맀직 λ„˜λ²„(Magic Number)κ°€ μ—¬λŸ¬ λ©”μ„œλ“œμ— λΆ„μ‚°λ˜μ–΄ 있으면, ν–₯ν›„ 검색 반경 기쀀을 λ³€κ²½ν•  λ•Œ 일뢀 λˆ„λ½λ˜κ±°λ‚˜ 일관성이 깨질 μœ„ν—˜μ΄ μžˆμŠ΅λ‹ˆλ‹€. 클래슀 상단에 μƒμˆ˜λ₯Ό μ •μ˜ν•˜μ—¬ κ΄€λ¦¬ν•˜λŠ” 것을 ꢌμž₯ν•©λ‹ˆλ‹€.

μΆ”μ²œ κ°œμ„ μ•ˆ:

// 클래슀 레벨 μƒμˆ˜λ‘œ μ„ μ–Έ
private static final double DEFAULT_RADIUS_METERS = 3000.0;

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