-
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
Feat/#36 ticket buy #50
base: main
Are you sure you want to change the base?
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.
์ฝ๋ ์ง์๋๋ผ ๊ณ ์ํ์ จ์ต๋๋ค~!
@@ -18,6 +18,11 @@ public enum ErrorStatus implements BaseErrorCode{ | |||
_TICKET_INVALID_SORT_OPTION(HttpStatus.BAD_REQUEST, "TICKET400", "์๋ชป๋ ์ ๋ ฌ ์ต์ ์ ๋๋ค. ํ์ฉ๋ ๊ฐ์ 'ticketId', 'price', 'expired'์ ๋๋ค."), | |||
_TICKET_INVALID_PAGINATION_PARAMETERS(HttpStatus.BAD_REQUEST, "TICKET400", "ํ์ด์ง๋ ํฌ๊ธฐ ๊ฐ์ด ์ ํจํ์ง ์์ต๋๋ค. 0 ์ด์์ ๊ฐ์ ์ ๋ ฅํด ์ฃผ์ธ์."), | |||
|
|||
// ์ฟ ํฐ | |||
_COUPON_NOT_FOUND(HttpStatus.NOT_FOUND, "TICKET400", "ํด๋น ์ฟ ํฐ์ ์ฐพ์ ์ ์์ต๋๋ค."), |
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.
์๊ธฐ COUPON404 ์ด๋ค๊ฐ์ฌ?
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.
404 ๋ ์ฌ์ฉ์๊ฐ ์กด์ฌํ์ง ์๋ URL ์ ์ ์ ํ์ ๋ ๋๋ ์๋ฌ๋ก ์๊ณ ์๋๋ฐ, 400 BadRequest ๊ฐ ๊ด์ฐฎ์ง ์์๊น์ ?
LocalDateTime createdAt | ||
) { | ||
// ์ ์ ํฉํ ๋ฆฌ ๋ฉ์๋ of | ||
public static CouponResponseDto of(Long couponId, String name, int percent, boolean isUsed, |
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.
์ด๊ฑฐ ์ ํฌ ์ปจ๋ฒค์
์ด ํ๋๋ฅผ ๋ชจ๋ ์ฌ์ฉํด์ ์์ฑํ ๋๋ create,
2๊ฐ์ด์์ด๋ฉด of,
ํ๋์ผ๋๋ from ์๋๊ฐ์ฌ?
์ ๋ ํท๊ฐ๋ ค์ ์ฌ์ญค๋ด
๋๋ค..!
} | ||
|
||
// ์ํฐํฐ๋ก๋ถํฐ DTO๋ฅผ ์์ฑํ๋ ๋ฉ์๋ from | ||
public static CouponResponseDto from(CouponEntity couponEntity) { |
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.
ํน์ ์ฌ๊ธฐ์ request์์ toEntity๋ฅผ ํ๋๊ฒ์ฒ๋ผ fromEntity๋ผ๊ณ ํ๋๊ฑด ์ด๋ ์ ๊ฐ์?!
@@ -16,7 +17,7 @@ public interface TicketService { | |||
// ์์ธ ์กฐํ | |||
TicketResponseDto getTicketByEmailAndTicketId(Long ticketId); | |||
|
|||
// TicketResponse createTicket(Long memberId, TicketRequest ticketRequest); | |||
TicketResponseDto registerticket(TicketRequestDto ticketRequest); |
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.
์นด๋ฉ์ผ์ด์ค ์ ์ฉํด์ registerTicket์ผ๋ก ํ์๋๊ฒ ์ด๋ ์ ๊ฐ์??!
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.
๋ค์ด๋ฐ ์ค์ํ๋ค์. ์ฒดํฌ ๊ฐ์ฌํฉ๋๋ค!
๐ ๊ณผ์ ์ค๋ช
ํ์์ด ํฐ์ผ์ ๋ฐ๊ถํ ๋์ ๊ธฐ๋ฅ ์ถ๊ฐ
ํ์ ๋ ๊ณต์ฐ ์กฐํ -> ๊ฒฐ์ฌ ์งํ -> ๊ฒฐ์ฌ ์๋ฃ -> ํฐ์ผ ๋ฐ๊ถ
๐ฉโ๐ป ์๊ตฌ ์ฌํญ๊ณผ ๊ตฌํ ๋ด์ฉ
โ ํผ๋๋ฐฑ ๋ฐ์์ฌํญ
โ PR ํฌ์ธํธ & ๊ถ๊ธํ ์