Skip to content

mateboard 이미지 부분 수정#176

Merged
sete3683 merged 3 commits into
developfrom
hotfix/Mateboard
Apr 14, 2025
Merged

mateboard 이미지 부분 수정#176
sete3683 merged 3 commits into
developfrom
hotfix/Mateboard

Conversation

@zelly-log
Copy link
Copy Markdown
Collaborator

mateboard 이미지 부분 수정

🔘 Part

  • BE
  • Infra

🔎 PR Type

  • 새로운 기능 추가
  • 버그 수정
  • 주요 코드 리팩토링(성능 최적화 등)
  • 간단 코드 리팩토링(주석, 코드 컨벤션, 오타 수정 등)
  • 기타 (기타 사항 기입)

🔧 작업 내용 상세 작성

  • [레포 이름 #이슈번호](이슈 주소)

  • 작업 내용을 상세하게 작성해 주세요!

✔️ PR Checklist

  • 커밋 메세지를 컨벤션에 맞게 잘 적용 하였나요?

  • 테스트 코드 작성 / 단위 테스트 or 통합 테스트 진행 하셨나요?

@zelly-log zelly-log added the bug 버그 관련 label Apr 14, 2025
@zelly-log zelly-log requested a review from sete3683 April 14, 2025 02:29
@zelly-log zelly-log self-assigned this Apr 14, 2025
import static com.frend.planit.domain.mateboard.post.entity.QMatePostLike.matePostLike;

import com.frend.planit.domain.image.entity.QImage;
import com.frend.planit.domain.image.type.HolderType;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

라인 7에서 HolderType import가 추가되었습니다. MateQueryRepositoryImpl에서 이미지를 처리하는 로직에 HolderType을 사용하는 것으로 보입니다. 필요한 import인지 확인하고, HolderType.MATEBOARD 상수의 정의가 명확한지 확인해야 합니다. 상수의 이름이 명확하지 않다면 수정을 고려해야 합니다. 만약 다른 곳에서도 사용되는 상수라면 문제 없겠지만요.

JPAExpressions
.select(image.url)
.from(image)
.where(image.holderType.eq(HolderType.MATEBOARD)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

104-105라인에 추가된 코드는 Mateboard 게시글에 연결된 이미지를 가져오는 쿼리로 보입니다. image.holderType.eq(HolderType.MATEBOARD) 부분은 이미지의 소유자가 Mateboard임을 확인하고, image.holderId.eq(mate.id)는 특정 Mateboard ID와 연결된 이미지만 가져오도록 합니다. 이 부분의 쿼리 성능에 대한 검토가 필요합니다. 인덱스가 제대로 설정되어 있는지 확인해야 하고, 필요하다면 쿼리 최적화를 위한 추가 작업이 필요할 수 있습니다. 어떤 필드에 접근하는지 명확하게 보이도록 imagemate 객체의 정확한 타입을 주석으로 명시하는 것을 추천합니다. 예를 들어, // image: QImage, mate: QMates 와 같이요.

@sete3683 sete3683 merged commit e729ad4 into develop Apr 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 버그 관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants