-
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
feat : 발급 티켓 가져오기 API 작성 (#73) #73
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
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 RetrieveIssuedTicketDetailResponse execute(Long issuedTicketId) { | ||
Long currentUserId = SecurityUtils.getCurrentUserId(); | ||
/* | ||
Todo: 지연 로딩 트랜잭션 이슈 때문에 일단은 DTO로 감싸서 올림. But, 이게 최선일까? 고민해보자. | ||
*/ | ||
IssuedTicketDTO issuedTicket = | ||
issuedTicketDomainService.retrieveIssuedTicket(currentUserId, issuedTicketId); | ||
User user = userDomainService.retrieveUser(currentUserId); | ||
return new RetrieveIssuedTicketDetailResponse(issuedTicket, user); | ||
} | ||
} |
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.
usecase 에서도 트랜잭션 걸어두됩니다요!
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.
레디슨 락 쓸때만 주의하면 되긴하는데
저도 레디슨 락때문에 고생중인데 해결해서 함 올려볼게요
다른방법으론 쿼리용 레포지토리를 만들어서
페치조인 때리고 올려오는 방법이있을거같긴해요
뷰를 위한 쿼리로 cqrs 비슷하게 커맨드랑 쿼리를 구분해서
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.
페치조인도 쓰고 요즘은 QueryDsl 많이 사용한다 하더라구요 나중에 복잡해지면 설정해서 사용해보겠습니당
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.
굿굿 티켓상품 짤때 코드 참고해가며 맞춰볼게용✌️
개요
작업사항
변경로직