Skip to content

Comments

[REFACTOR/#233] 성주 리팩토링#241

Merged
BAEK0111 merged 7 commits intodevelopfrom
refactor/#233-sjhwang-refactoring
Feb 22, 2026
Merged

[REFACTOR/#233] 성주 리팩토링#241
BAEK0111 merged 7 commits intodevelopfrom
refactor/#233-sjhwang-refactoring

Conversation

@sjhwang0
Copy link
Contributor

@sjhwang0 sjhwang0 commented Feb 6, 2026

#️⃣연관된 이슈

#233

📝작업 내용

  • Admin, Partner, Map, Partnership 공통 리팩토링

컨트롤러 명세에 맞게 수정
transactional annotation 작업
DTO -> Record 변경 (DTO 파일 내에 DTO가 많은 경우에는 그대로 유지)
주석, 안쓰는 메소드 및 모듈 삭제

  • 제휴 유형에 맞지 않는 경우를 위해 기타 유형 추가

paperContent Entity에 anotherType Boolean 필드 추가

  • Map, Partnership N+1 방지

  • Service에 있던 빌드를 컨버터로 옮기면서 일관성 유지

  • StoreMapResponseDTO 응답 형식 변경 (getStores, searchStores)

옵션을 다 보내지 않고 혜택 문구를 benefit 변수에 담아 전달

🔎코드 설명(스크린샷(선택))

코드에 대한 설명을 작성해주세요.

💬고민사항 및 리뷰 요구사항 (Optional)

고민사항 및 의견 받고 싶은 부분 있으면 적어두기

비고 (Optional)

참고했던 링크 등 참고 사항을 적어주세요. 코드 리뷰하는 사람이 참고해야 하는 내용을 자유로운 형식으로 적을 수 있습니다.

- 공통 사항 수정
- 공통 및 추가 리팩토링
- map n+1 방지
- 기타 유형 another_type 추가 (paperContent Entity 수정)
@sjhwang0 sjhwang0 changed the title [Refactor/#233] 성주 리팩토링 [REFACTOR/#233] 성주 리팩토링 Feb 7, 2026
(a.department = :department AND a.major IS NULL) OR
(a.department = :department AND a.major = :major)
)
""")
Copy link
Member

Choose a reason for hiding this comment

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

지금 쿼리들이 인덱스가 필요한 경우가 많이 보입니다. 잊지말고 추후 개선사항에 인덱스까지 적용해서 레포지토리 쿼리를 보강합시다

private String adminName;
private String adminUrl;
private String adminPhone;
public record AdminLiteDTO(
Copy link
Member

Choose a reason for hiding this comment

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

지금 DTO에 @NotNull등의 제약 어노테이션이 빠진 부분이 많으니 보강부탁드립니다

WHERE pc.paper.store.id IN :storeIds
ORDER BY pc.id DESC
""")
List<PaperContent> findTopByStoreIdIn(@Param("storeIds") List<Long> storeIds);
Copy link
Member

Choose a reason for hiding this comment

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

추후에 Pagenation을 꼭 추가해야할 것 같습니다. 웬만하면 전체조회시 리스트를 사용하지 않도록 해야합니다.

Copy link
Member

Choose a reason for hiding this comment

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

인덱스 없는 상태에서 조건부와 JOIN을 하게 되면 추후 병목발생 가능성이 높으니 최적화 부탁드립니다.

sjhwang0 and others added 5 commits February 22, 2026 00:52
- 모든 dto를 record로 변경
- 모든 dto를 record로 변경
- 빌드 오류 해결
- storemapresponsedto 응답 방식 변경
- 지도 내 매장조회 로직 변경
@BAEK0111 BAEK0111 merged commit 2a13b57 into develop Feb 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants