-
Notifications
You must be signed in to change notification settings - Fork 10
[22기_이수아] 동시성 & 결제 연동 미션 제출합니다. #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
danaggero
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
너무 수고 많으셨습니다!!
| } | ||
|
|
||
| //==생성 메서드=// | ||
| public static OrderEntity createOrder(Long memberId, Long cinemaId, OrderFoodEntity... items) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런식으로 여러 개의 인자를 받을 수도 있군요..
| .orElseThrow(null); | ||
| return Cinema.from(cinema); | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
읽기 전용 클래스를 분리하셨네요! 확장성과 책임분리 측면에서 좋은 설계인 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reader 클래스에는 트랜잭션 ReadOnly를 true로 설정해야 할까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saver, reader로 분리할 생각을 못했네요. 제가 아직 책임분리 코드 작성을 못했는데 참고해보겠습니다!
| @Transactional(readOnly = true) | ||
| public class FavoriteCinemaService { | ||
|
|
||
| private FavoriteCinemaReader favoriteCinemaReader; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final 키워드가 누락된 것 같아요!
| favoriteMovieRepository.delete(new FavoriteMovieEntity(memberId, movieId)); | ||
| } | ||
|
|
||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 Transactional 처리가 필요할 것 같아요!
junilyy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
시험 기간인데 고생많으셨습니다!
| @Target({ElementType.FIELD}) | ||
| @Retention(RetentionPolicy.RUNTIME) | ||
| @Documented | ||
| @Component | ||
| public @interface ExplainError { | ||
| String value() default ""; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어노테이션을 직접 정의하신건가요? 혹시 어디에 이용되는지 알 수 있을까요
| CinemaEntity cinemaEntity = cinemaRepository.findById(id) | ||
| .orElseThrow(() -> new IllegalArgumentException("영화관을 찾을 수 없습니다. id=" + id)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
얘만 IllegalArgumentException로 따로 처리하는 이유가 있나요??
| .orElseThrow(null); | ||
| return Cinema.from(cinema); | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saver, reader로 분리할 생각을 못했네요. 제가 아직 책임분리 코드 작성을 못했는데 참고해보겠습니다!
시험 + 책임 분리 단계에서 뜯어고칠 코드 많음 이슈로 과제 진행도가 미흡합니다...
최대한 스터디 전까지 완료하겠습니다..!