Conversation
[FEAT]: 식당(Store) 도메인 엔티티 설계
[FEAT]: HTTPS 적용 및 NGINX Blue-Green 무중단 배포 전환 로직 수정
main 브랜치와 코드 통일
[FIX]: 불필요 도커이미지 제거 명령어 배포 스크립트에 추가
Readme 회원정보 수정
* FEAT: 사업자 인증 시 대표자 성명 입력 필드 추가 및 검증 반영 * FEAT: 가게 등록 시 사업자번호 대표 성명 입력 필드 추가 및 검증 로직 반영
📝 Walkthrough워크스루이 PR은 Store와 TableImage 도메인의 DTO 및 변환기를 수정하여 지리적 좌표(위도/경도)를 StoreSearchDto에 추가하고, TableImage 응답을 단순 URL 문자열에서 ID와 URL을 포함한 구조화된 객체로 변경합니다. 변경사항
코드 리뷰 예상 소요시간🎯 3 (Moderate) | ⏱️ ~20분 관련 PR
추천 리뷰어
축하 시
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java (2)
62-62:⚠️ Potential issue | 🟡 Minor
reviewCount타입 불일치 —StoreSearchDto는Integer,StoreDetailDto는Long동일한 의미의
reviewCount필드가StoreSearchDto에서는Integer,StoreDetailDto에서는Long으로 선언되어 있습니다. 리뷰 수는 대규모 데이터 가능성이 있으므로Long으로 통일하거나, 의도적 차이라면 주석으로 명시해 주세요.♻️ 수정 제안 (Long으로 통일)
- Integer reviewCount, // 리뷰 도메인이 존재하지 않아 null 허용 + Long reviewCount, // 리뷰 도메인이 존재하지 않아 null 허용🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java` at line 62, The review points out inconsistent types for the same semantic field reviewCount across DTOs; update the declaration for reviewCount in StoreSearchDto (and any related mapping/constructor usages) to use Long to match StoreDetailDto (or vice versa if you prefer smaller type), and ensure all references, builders, and conversion methods that set or get reviewCount (e.g., in StoreSearchDto, StoreDetailDto, and StoreResDto) are updated accordingly and compile; if the difference was intentional, add a clarifying comment on the DTO field explaining the reason.
65-65:⚠️ Potential issue | 🟠 Major
StoreDetailDto.tableImageUrls를 id+url 구조로 변경하거나 설계 의도 명시 필요PR 목표("테이블 이미지 조회 응답을 id, url로 묶어서 반환")와 달리,
StoreDetailDto의tableImageUrls는 여전히List<String>으로 유지되고 있습니다. 반면TableImageResDto.GetTableImageDto에서는List<TableImageItem>(id+url 구조)으로 일관성 있게 적용되었습니다.두 조회 응답의 구조를 통일하려면:
StoreDetailDto의tableImageUrls를List<TableImageItem>으로 변경하거나- 별도 엔드포인트에만 id+url 구조를 적용한다는 설계 의도를 주석으로 명시해야 합니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java` at line 65, The StoreDetailDto field tableImageUrls in StoreResDto is still a List<String> but should match the id+url structure used by TableImageResDto.GetTableImageDto (List<TableImageItem>) per the PR goal; change the type of tableImageUrls to List<TableImageItem> in StoreResDto/StoreDetailDto, update constructors/factory/mapping logic that populates it (e.g., any toDto/fromEntity methods), add the necessary import for TableImageItem, and adjust JSON/serialization names if needed; alternatively, if the intent is to keep List<String> only for this DTO, add a clear comment on StoreResDto/StoreDetailDto explaining that only the table image endpoint returns id+url and why the simpler List<String> is kept here.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.java`:
- Line 29: toSearchDto currently maps store.getMainImageKey() directly into
mainImageUrl causing inconsistency with other converters; update either the call
site in StoreQueryServiceImpl to pass s3Service.toUrl(store.getMainImageKey())
into StoreConverter.toSearchDto, or change StoreConverter.toSearchDto signature
to accept an extra String mainImageUrl parameter (e.g., toSearchDto(Store store,
Double distance, String mainImageUrl, boolean isOpenNow)) and use that value for
mainImageUrl, ensuring all callers are updated to supply the pre-converted URL
from s3Service.toUrl.
In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java`:
- Around line 31-32: StoreSearchDto currently declares latitude and longitude as
primitive double which can NPE during auto-unboxing in
StoreConverter.toSearchDto when calling store.getLatitude()/store.getLongitude()
(which return nullable Double); change the StoreSearchDto record's latitude and
longitude types from double to Double if location is optional, or alternatively
keep primitives but add null-safe handling in StoreConverter.toSearchDto (e.g.,
provide default values or conditional mapping) to avoid unboxing nulls — update
references in StoreConverter.toSearchDto and any callers accordingly.
In
`@src/main/java/com/eatsfine/eatsfine/domain/tableimage/dto/TableImageResDto.java`:
- Around line 9-13: UploadTableImageDto currently uses List<String>
tableImageUrls while GetTableImageDto uses List<TableImageItem>, causing
inconsistent API shapes; change UploadTableImageDto to use List<TableImageItem>
(or a dedicated UploadTableImageItem if you need different fields) by updating
the record declaration UploadTableImageDto(Long storeId, List<TableImageItem>
tableImageItems), adjust the `@Builder` usage and any constructors/build sites,
and update all usages/serializers/deserializers to accept the TableImageItem
structure so clients can track IDs consistently after upload.
- Around line 15-25: Move the nested record declaration TableImageItem so it
appears before GetTableImageDto; specifically reorder the two record
declarations so TableImageItem is declared first, then GetTableImageDto (which
references TableImageItem), to improve readability while keeping existing
builders and field names unchanged.
---
Outside diff comments:
In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java`:
- Line 62: The review points out inconsistent types for the same semantic field
reviewCount across DTOs; update the declaration for reviewCount in
StoreSearchDto (and any related mapping/constructor usages) to use Long to match
StoreDetailDto (or vice versa if you prefer smaller type), and ensure all
references, builders, and conversion methods that set or get reviewCount (e.g.,
in StoreSearchDto, StoreDetailDto, and StoreResDto) are updated accordingly and
compile; if the difference was intentional, add a clarifying comment on the DTO
field explaining the reason.
- Line 65: The StoreDetailDto field tableImageUrls in StoreResDto is still a
List<String> but should match the id+url structure used by
TableImageResDto.GetTableImageDto (List<TableImageItem>) per the PR goal; change
the type of tableImageUrls to List<TableImageItem> in
StoreResDto/StoreDetailDto, update constructors/factory/mapping logic that
populates it (e.g., any toDto/fromEntity methods), add the necessary import for
TableImageItem, and adjust JSON/serialization names if needed; alternatively, if
the intent is to keep List<String> only for this DTO, add a clear comment on
StoreResDto/StoreDetailDto explaining that only the table image endpoint returns
id+url and why the simpler List<String> is kept here.
| .distance(distance) | ||
| .latitude(store.getLatitude()) | ||
| .longitude(store.getLongitude()) | ||
| .mainImageUrl(store.getMainImageKey()) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# 1. StoreConverter.java 파일의 전체 내용 확인 (크기 확인)
wc -l src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.javaRepository: Eatsfine/BE
Length of output: 137
🏁 Script executed:
# 2. StoreConverter.java의 toSearchDto 메소드 주변 코드 확인
sed -n '1,50p' src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.javaRepository: Eatsfine/BE
Length of output: 2649
🏁 Script executed:
# 3. mainImageKey, mainImageUrl 관련 사용 패턴 확인
rg "mainImageKey|mainImageUrl" --type java -C 3Repository: Eatsfine/BE
Length of output: 15923
🏁 Script executed:
# 4. S3 URL 변환 관련 로직 검색
rg "presigned|CDN|getUrl|toUrl|imageUrl" --type java -C 2Repository: Eatsfine/BE
Length of output: 18123
🏁 Script executed:
# Verify where toSearchDto is called from
rg "toSearchDto" --type java -B 3 -A 3Repository: Eatsfine/BE
Length of output: 1859
toSearchDto 메소드에서 S3 키를 URL로 변환하지 않고 직접 매핑 — 아키텍처 패턴 불일치
toSearchDto는 store.getMainImageKey()를 그대로 mainImageUrl 필드에 매핑하고 있습니다. 반면 toDetailDto, toMyStoreDto 등 다른 변환 메소드들은 서비스 레이어에서 s3Service.toUrl()로 변환된 값을 받아 사용합니다.
현재 StoreQueryServiceImpl에서 toSearchDto 호출 시:
.map(row -> StoreConverter.toSearchDto(
row.store(),
row.distance(),
isOpenNow(row.store(), now)))mainImageUrl 필드명은 URL을 기대하므로, 다른 메소드들과 동일하게 서비스 레이어에서 먼저 s3Service.toUrl(store.getMainImageKey())로 변환한 후 전달하거나, 메소드 시그니처를 (Store store, Double distance, String mainImageUrl, boolean isOpenNow)로 수정하여 일관성을 유지해야 합니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.java`
at line 29, toSearchDto currently maps store.getMainImageKey() directly into
mainImageUrl causing inconsistency with other converters; update either the call
site in StoreQueryServiceImpl to pass s3Service.toUrl(store.getMainImageKey())
into StoreConverter.toSearchDto, or change StoreConverter.toSearchDto signature
to accept an extra String mainImageUrl parameter (e.g., toSearchDto(Store store,
Double distance, String mainImageUrl, boolean isOpenNow)) and use that value for
mainImageUrl, ensuring all callers are updated to supply the pre-converted URL
from s3Service.toUrl.
| double latitude, | ||
| double longitude, |
There was a problem hiding this comment.
프리미티브 double로 선언된 latitude/longitude — null 역참조 위험
StoreSearchDto record의 latitude, longitude가 double 프리미티브로 선언되어 있습니다. StoreConverter.toSearchDto에서 store.getLatitude() / store.getLongitude()가 Double (nullable)을 반환하면 auto-unboxing 시 NPE가 발생합니다. 위치 정보가 필수 값이 아닌 경우 Double로 변경하거나, 컨버터에서 null-safe 처리를 추가해야 합니다.
🛡️ 수정 제안 (nullable 허용 시)
- double latitude,
- double longitude,
+ Double latitude,
+ Double longitude,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| double latitude, | |
| double longitude, | |
| Double latitude, | |
| Double longitude, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java` around
lines 31 - 32, StoreSearchDto currently declares latitude and longitude as
primitive double which can NPE during auto-unboxing in
StoreConverter.toSearchDto when calling store.getLatitude()/store.getLongitude()
(which return nullable Double); change the StoreSearchDto record's latitude and
longitude types from double to Double if location is optional, or alternatively
keep primitives but add null-safe handling in StoreConverter.toSearchDto (e.g.,
provide default values or conditional mapping) to avoid unboxing nulls — update
references in StoreConverter.toSearchDto and any callers accordingly.
| @Builder | ||
| public record UploadTableImageDto( | ||
| Long storeId, | ||
| List<String> tableImageUrls) { | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
UploadTableImageDto가 여전히 List<String>을 사용하는 설계 일관성 확인 필요
GetTableImageDto는 List<TableImageItem>으로 변경되었지만, UploadTableImageDto는 여전히 List<String> tableImageUrls로 날(raw) URL 문자열을 사용합니다. 업로드 응답에 ID가 필요하지 않다면 의도적인 설계 차이일 수 있으나, 이미지 업로드 후 클라이언트가 ID를 추적해야 하는 경우라면 동일한 TableImageItem 구조를 사용하는 것이 좋습니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@src/main/java/com/eatsfine/eatsfine/domain/tableimage/dto/TableImageResDto.java`
around lines 9 - 13, UploadTableImageDto currently uses List<String>
tableImageUrls while GetTableImageDto uses List<TableImageItem>, causing
inconsistent API shapes; change UploadTableImageDto to use List<TableImageItem>
(or a dedicated UploadTableImageItem if you need different fields) by updating
the record declaration UploadTableImageDto(Long storeId, List<TableImageItem>
tableImageItems), adjust the `@Builder` usage and any constructors/build sites,
and update all usages/serializers/deserializers to accept the TableImageItem
structure so clients can track IDs consistently after upload.
| @Builder | ||
| public record GetTableImageDto( | ||
| Long storeId, | ||
| List<TableImageItem> tableImages) { | ||
| } | ||
|
|
||
| @Builder | ||
| public record DeleteTableImageDto( | ||
| Long storeId, | ||
| List<Long> deletedTableImageIds | ||
| ){} | ||
| @Builder | ||
| public record TableImageItem( | ||
| Long tableImageId, | ||
| String tableImageUrl) { | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
TableImageItem 선언 순서를 GetTableImageDto 위로 이동하는 것을 권장합니다.
GetTableImageDto(Line 16–19)가 TableImageItem을 참조하고 있는데, TableImageItem은 그 아래(Line 22–25)에 선언되어 있습니다. Java 컴파일러는 동일 클래스 내에서 선언 순서와 무관하게 타입을 해석하므로 컴파일 오류는 없지만, 참조되는 타입이 나중에 등장하면 코드 가독성이 저하됩니다.
♻️ 선언 순서 정렬 제안
+ `@Builder`
+ public record TableImageItem(
+ Long tableImageId,
+ String tableImageUrl) {
+ }
+
`@Builder`
public record GetTableImageDto(
Long storeId,
List<TableImageItem> tableImages) {
}
- `@Builder`
- public record TableImageItem(
- Long tableImageId,
- String tableImageUrl) {
- }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @Builder | |
| public record GetTableImageDto( | |
| Long storeId, | |
| List<TableImageItem> tableImages) { | |
| } | |
| @Builder | |
| public record DeleteTableImageDto( | |
| Long storeId, | |
| List<Long> deletedTableImageIds | |
| ){} | |
| @Builder | |
| public record TableImageItem( | |
| Long tableImageId, | |
| String tableImageUrl) { | |
| } | |
| `@Builder` | |
| public record TableImageItem( | |
| Long tableImageId, | |
| String tableImageUrl) { | |
| } | |
| `@Builder` | |
| public record GetTableImageDto( | |
| Long storeId, | |
| List<TableImageItem> tableImages) { | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@src/main/java/com/eatsfine/eatsfine/domain/tableimage/dto/TableImageResDto.java`
around lines 15 - 25, Move the nested record declaration TableImageItem so it
appears before GetTableImageDto; specifically reorder the two record
declarations so TableImageItem is declared first, then GetTableImageDto (which
references TableImageItem), to improve readability while keeping existing
builders and field names unchanged.
💡 작업 개요
✅ 작업 내용
🧪 테스트 내용
📝 기타 참고 사항
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선 사항