Skip to content

[REFACTOR/#234] 예원 리팩토링#239

Open
kimyw1018 wants to merge 2 commits intomainfrom
refactor/#234-coco-refactoring-1
Open

[REFACTOR/#234] 예원 리팩토링#239
kimyw1018 wants to merge 2 commits intomainfrom
refactor/#234-coco-refactoring-1

Conversation

@kimyw1018
Copy link
Contributor

#️⃣연관된 이슈

#234

📝작업 내용

작업한 내용을 작성해주세요.
review 도메인
Store (가게) 도메인
Admin & DashBoard (관리자/통계) 도메인
Partner (파트너 추천) 도메인

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

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

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

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

비고 (Optional)

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

@kimyw1018 kimyw1018 self-assigned this Jan 21, 2026
@kimyw1018 kimyw1018 added the ♻️ refactor Refactor code label Jan 21, 2026
Copy link
Member

@2ghrms 2ghrms left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~


private String detailAddress;

private String signUrl;
Copy link
Member

Choose a reason for hiding this comment

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

이거 이미지로 입력받는거니까 signImageUrl로 명시해줍시다

@Column(nullable = false)
private Double longitude;

public void setMember(Member member) {
Copy link
Member

Choose a reason for hiding this comment

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

@Setter가 생성해주는 메소드와 겹치니, 해당 메소드를 사용하는 상황에 맞추어서 메소드 명을 변경해주면 좋을 것 같습니다

@@ -87,7 +82,7 @@
List<StoreUsageWithPaper> findUsageByStoreIncludingZero(@Param("adminId") Long adminId);

interface StoreUsageWithPaper {
Copy link
Member

Choose a reason for hiding this comment

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

유지보수를 고려하여서 record 기반의 DTO로 리팩토링합시다

JOIN paper p ON p.id = pc.paper_id
WHERE p.admin_id = :adminId
AND pu.created_at >= CURRENT_DATE
AND pu.created_at < CURRENT_DATE + INTERVAL 1 DAY
Copy link
Member

Choose a reason for hiding this comment

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

이거 CURRENT_DATE가 서버시간 기준이므로 혹시 UTC가 안맞을 것을 대비해서 JPQL로 변수를 입력받는 것으로 변경해주세

private ReportedStatus status = ReportedStatus.NORMAL;

// 상태 업데이트 메서드
public List<ReviewPhoto> getImageList() {
Copy link
Member

Choose a reason for hiding this comment

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

이거 Getter로 대체되니 삭제합시다

@Builder
@Getter
public static class todayBest{
public static class TodayBest{
Copy link
Member

Choose a reason for hiding this comment

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

DTO 컨벤션에 따라서 클래스명을 ~DTO로 수정하고 record 로 수정합시다

Copy link
Contributor

Choose a reason for hiding this comment

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

마자여 record로 수정 안 된 부분들 반영 부탁드립니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ refactor Refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants