-
Notifications
You must be signed in to change notification settings - Fork 17
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
아이템 수정 & 데이로그 수정 & 아이템 oridinal 수정 재업로드 #710
Conversation
📝 Jacoco Test Coverage
|
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.
두번 올리느라 홍고생 하셨습니다 홍고 🍊
코드가 매우 깔끔하군요
Aㅏ프루-브 하겠습니다
|
||
@Override | ||
public void updateOrdinals(final List<Long> orderedItemIds) { | ||
final String sql = "UPDATE item SET ordinal = :newOrdinal WHERE id = :itemId"; |
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.
얘는 줄바꿈 안하나요? 짧아서 안해도 되는건가?!
private Place makeUpdatedPlace(final ItemUpdateRequest itemUpdateRequest, final Item item) { | ||
final Place originalPlace = item.getPlace(); | ||
if (isPlaceNotUpdated(itemUpdateRequest, item)) { | ||
return originalPlace; | ||
} | ||
final Place updatedPlace = createPlaceByPlaceRequest(itemUpdateRequest.getPlace()); | ||
deleteNotUsedPlace(originalPlace); | ||
return saveNewlyUpdatedPlace(updatedPlace); |
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.
좋!은!데!요?
* refactor: 아이템, 데이로그 수정 쿼리 개선 * refactor: 아이템 수정 로직 변경
📄 Summary
이전 PR
아이템 수정 로직 좀 더 가독성있게 수정함. (근데 아직도 가독성 좋은 지 잘 모르겠음) 커밋
아이템의 Place, Expense, Image의 수정 로직을 아래의 플로우로 통일 (
originalObject
: 변경 요청전의 오브젝트)originalObject
사용🙋🏻 More