Skip to content

Conversation

@jumining
Copy link
Collaborator

@jumining jumining commented Nov 19, 2024

Related issue 🚀

Work Description 💚

  • 배너 정보(제목, 부제목, 이미지url, 링크) 불러오는 api 추가

PR 참고 사항

  • dev db에 banners 테이블을 추가하였습니다.
  • banners 테이블에 항상 활성화된 배너 요소 하나만 있다고 생각하여(이전 배너 정보 저장할 필요 없음) jpa메소드 findTopByOrderByIdAsc()사용했습니다. 에러 처리는 해두었습니다.
  • 기존 코드 구성 활용했습니다.
  • dev 서버에서 테스트하고 prod 서버에 올리려고 합니다.
스크린샷 2024-11-20 12 06 20

@jumining jumining added ✨ Feat 새로운 기능 추가 👩🏻‍💻 주민 주민이가 작성한 Label labels Nov 19, 2024
@jumining jumining self-assigned this Nov 19, 2024
@jumining jumining requested a review from kseysh November 19, 2024 04:44
Copy link
Member

@kseysh kseysh left a comment

Choose a reason for hiding this comment

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

깔끔하게 잘 작성해주신 것 같아요 👍
코멘트 하나만 남겼는데 확인 부탁드립니다!

Comment on lines 1 to 9
package sopt.org.hmh.domain.banner.repository;

import sopt.org.hmh.domain.banner.Banner;

import java.util.Optional;

public interface BannerRepository {
Optional<Banner> findTopByOrderByIdAsc();
}
Copy link
Member

@kseysh kseysh Nov 19, 2024

Choose a reason for hiding this comment

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

P4. Banner 엔티티는 Jpa외에 복잡한 쿼리를 사용할 일이 없을 것 같아 JpaRepository 하나만 있는게 코드 복잡도 측면에서 더 좋을 것 같은데 어떠신가요?

저는 보통 복잡한 쿼리가 필요하여 Querydsl 사용시에 이렇게 나누는 편이라 복잡한 쿼리가 필요없다면 하나만 유지해도 좋을 것 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

좋은 생각입니당! 빠른 코리 감사드려요

@jumining jumining merged commit da402e9 into develop Nov 20, 2024
1 check passed
@jumining jumining deleted the feat/#196-get-banner branch November 20, 2024 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feat 새로운 기능 추가 👩🏻‍💻 주민 주민이가 작성한 Label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat - 배너 정보 불러오는 api 추가

3 participants