-
Notifications
You must be signed in to change notification settings - Fork 0
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
콘서트 좌석정보 수정, 콘서트 상태 close로 변경 API 개발 및 콘서트 상태 open 변경 스케줄러 작업 추가 #4
Conversation
); | ||
} | ||
|
||
@PutMapping("/{id}/state/close") |
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.
/{id}/close 로 해도 될것 같습니다.
@@ -141,4 +145,43 @@ public Concert updatePlace(Place place, List<ConcertSeat> seats) { | |||
.seats(List.copyOf(seats)) | |||
.build(); | |||
} | |||
|
|||
public Concert changeState(ConcertState state) { |
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.
메서드명이 changeState 인데 실제로는 get 을 수행하는것 같습니다.
getListVo.name() != null ? concertEntity.name.contains(getListVo.name()) : null, | ||
getListVo.placeName() != null ? placeEntity.name.contains(getListVo.name()) : null, | ||
getListVo.state() != null ? concertEntity.state.eq(getListVo.state()) : null, | ||
getListVo.openTime() != null ? concertEntity.openTime.loe(getListVo.openTime()) : null |
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.
contains 조건절은 성능 저하가 심합니다.
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.
loe 보다는 임의의 시간을 줘서 between 으로 하시는게 좋습니다.
|
||
public List<ConcertEntity> getList(GetConcertListVo getListVo) { | ||
return selectFrom(concertEntity) | ||
.leftJoin(concertEntity.placeEntity, placeEntity) |
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.
leftJoin 은 성능 저하가 커서 케이스에 따라 나누는 걸 추천드립니다.
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.
InnerJoin 으로도 괜찮을거 같아요.
Quality Gate passedIssues Measures |
No description provided.