-
Notifications
You must be signed in to change notification settings - Fork 1
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
입덕포인트 생성, 존재 유무 구현 #74 #109
Conversation
@Transactional | ||
public void save(Long memberId, AttractionPointReq req) { | ||
if(checkAttractionPoint(memberId, req.getAnimeId()).getIsAttractionPoint()){ | ||
throw new BadRequestException("AttractionPoint is already exists."); |
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.
중복 -> 충돌 -> 409 ConflictException 쓰시면 됩니다~
.orElseThrow(() -> new NotFoundException("Anime")); | ||
|
||
|
||
for(int i = 0; i < req.getAttractionElements().size(); i++){ |
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.
steam으로 쓰실 수 있으면 더 좋습니다
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.
감사합니다 수정했습니다!
.anime(anime) | ||
.attractionElement(attractionElement) | ||
.build()) | ||
.forEach(attractionPointRepository::save); |
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.
동일한 엔티티를 여러번 저장하는 경우, 리스트에 담아서 saveAll로 저장하는 걸 추천 드립니다.
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.
넵 감사합니다 수정했습니다!
📝 개요
입덕포인트 생성 및 존재 유무 구현
🚀 변경사항
🔗 관련 이슈
#74
➕ 기타