Skip to content
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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Feat/#36 ticket buy #50

wants to merge 16 commits into from

Conversation

skfk286
Copy link
Collaborator

@skfk286 skfk286 commented Oct 2, 2024

๐Ÿ“Œ ๊ณผ์ œ ์„ค๋ช…

ํšŒ์›์ด ํ‹ฐ์ผ“์„ ๋ฐœ๊ถŒํ•  ๋•Œ์˜ ๊ธฐ๋Šฅ ์ถ”๊ฐ€

ํ™•์ •๋œ ๊ณต์—ฐ ์กฐํšŒ -> ๊ฒฐ์žฌ ์ง„ํ–‰ -> ๊ฒฐ์žฌ ์™„๋ฃŒ -> ํ‹ฐ์ผ“ ๋ฐœ๊ถŒ

๐Ÿ‘ฉโ€๐Ÿ’ป ์š”๊ตฌ ์‚ฌํ•ญ๊ณผ ๊ตฌํ˜„ ๋‚ด์šฉ

  • feat : ํ‹ฐ์ผ“ ๋ฐœ๊ถŒ ๊ธฐ๋Šฅ ๊ตฌํ˜„
  • test : ํ‹ฐ์ผ“ ๋ฐœ๊ถŒ ๊ธฐ๋Šฅ ํ…Œ์ŠคํŠธ

โœ… ํ”ผ๋“œ๋ฐฑ ๋ฐ˜์˜์‚ฌํ•ญ

โœ… PR ํฌ์ธํŠธ & ๊ถ๊ธˆํ•œ ์ 

Copy link
Collaborator

@macmorning0116 macmorning0116 left a 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", "ํ•ด๋‹น ์ฟ ํฐ์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์š”๊ธฐ COUPON404 ์–ด๋–ค๊ฐ€์—ฌ?

Copy link
Collaborator Author

@skfk286 skfk286 Oct 3, 2024

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,
Copy link
Collaborator

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) {
Copy link
Collaborator

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์นด๋ฉœ์ผ€์ด์Šค ์ ์šฉํ•ด์„œ registerTicket์œผ๋กœ ํ•˜์‹œ๋Š”๊ฒŒ ์–ด๋– ์‹ ๊ฐ€์š”??!

Copy link
Collaborator Author

@skfk286 skfk286 Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋„ค์ด๋ฐ ์‹ค์ˆ˜ํ–ˆ๋„ค์š”. ์ฒดํฌ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

๊ณต์—ฐ ํ‹ฐ์ผ“์„ ๊ตฌ๋งคํ•œ๋‹ค.
2 participants