-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor(api) : 발급 티켓 API 관련 리팩토링 #102
Conversation
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.
굿굿
return IssuedTicketInfoVo.builder() | ||
.issuedTicketId(issuedTicket.getId()) | ||
.issuedTicketNo(issuedTicket.getIssuedTicketNo()) | ||
.uuid(issuedTicket.getUuid()) | ||
.ticketName(issuedTicket.getTicketItem().getName()) | ||
.ticketPrice(issuedTicket.getPrice()) | ||
.createdAt(issuedTicket.getCreatedAt()) | ||
.issuedTicketStatus(issuedTicket.getIssuedTicketStatus()) | ||
.optionPrice(issuedTicket.sumOptionPrice()) | ||
.build(); |
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.
IssuedTicketInfoVo 안에 from 정적 스테직 메서드 만들어서
집어넣으면 더깔금해질것같아유!
|
||
public static CreateIssuedTicketResponse orderLineItemToIssuedTickets( | ||
CreateIssuedTicketDTO dto) { | ||
long quantity = dto.getOrderLineItem().getQuantity(); |
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.
IssuedTicket 도메인에 뷰를 위한 응답값을 의존하는게 쬐금 맘에 걸리긴하네유
@@ -72,4 +73,14 @@ public void login() { | |||
throw ForbiddenUserException.EXCEPTION; | |||
} | |||
} | |||
|
|||
public UserInfoVo toUserInfoVo(User user) { | |||
return UserInfoVo.builder() |
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.
UserInfoVo
안에
publice static UserInfoVo from(User user){
return 빌더넣기
}
요래 바꿀수 있을듯!
|
||
private final Order order; | ||
|
||
private final OrderLineItem orderLineItem; |
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.
구현 수고하셨습니다
.createdAt(issuedTicket.getCreatedAt()) | ||
.issuedTicketStatus(issuedTicket.getIssuedTicketStatus()) | ||
.optionPrice(issuedTicket.sumOptionPrice()) | ||
.build(); |
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.
저같은 경우에도 찬진님처럼 매개변수로 도메인 객체 받는
static 메서드 of 구현해서 생성하는 방식을 선호하는데
한번 고려해 보세용
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
개요
작업사항
변경로직