-
Notifications
You must be signed in to change notification settings - Fork 3
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: 경매 생성 시 설정 가능한 경매 시간 및 적용할 수 있는 할인 주기를 다양하게 설정할 수 있게 검증을 변경합니다. #312
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 한정된 재고에서 구매할 수 있는 최대 수량까지만 구매 가능하고, 나머지는 구매하지 못하는 테스트 추가 - 포인트가 부족한 사람과 포인트가 넉넉한 사람이 구매할때, 순서가 섞여있다면, 포인트가 넉넉한 사람의 구매처리가 원자적으로 동작하는지 테스트 추가
…만 생성할 수 있게 검증을 변경한다. - 분, 초 상관없이 나누어 떨어지기만 하면 됨
- 기존에는 10분단위로 최대 60분이었음 - 변경한 부분은 분 단위면 가능하고, 1시간만 넘지 않도록 변경함 - 이에 경매 주기 시간을 더해 할인 주기 시간으로 나누었을때 나누어떨어지는 시간이어야 함
yudonggeun
previously approved these changes
Aug 26, 2024
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.
LGTM 👍
- #310이 반영되면서 컴파일이 깨지는 오류를 수정합니다.
yudonggeun
approved these changes
Aug 26, 2024
yudonggeun
added a commit
that referenced
this pull request
Aug 27, 2024
* refactor: 입찰 완료 시 거래내역 ID를 반환하기 (#310) * fix: 경매 식별자를 사용하는 컨트롤러 UUID로 수정 - Response 시에는 PurchaseResponse를 반환합니다 * fix: 기존 거래 내역 식별자 타입을 Long -> UUID 변경 * test: 거래 내역 식별자를 UUID로 타입 변경 시 깨지는 테스트 수정 * docs: index.html 업데이트 * fix: PR 리뷰 사항 반영 - 테스트 등에 UUID 명시 작업 진행 --------- Co-authored-by: HyeonSik Choi <[email protected]> * refactor: 경매 생성 시 설정 가능한 경매 시간 및 적용할 수 있는 할인 주기를 다양하게 설정할 수 있게 검증을 변경합니다. (#312) * test: 경매 입찰에 대한 동시성 테스트 추가 - 한정된 재고에서 구매할 수 있는 최대 수량까지만 구매 가능하고, 나머지는 구매하지 못하는 테스트 추가 - 포인트가 부족한 사람과 포인트가 넉넉한 사람이 구매할때, 순서가 섞여있다면, 포인트가 넉넉한 사람의 구매처리가 원자적으로 동작하는지 테스트 추가 * refactor: 기존 1, 5, 10분 경매 시간에서 경매 검증 방식에서 경매시간을 할인 주기로 나누었을때 나누어 떨어질때만 생성할 수 있게 검증을 변경한다. - 분, 초 상관없이 나누어 떨어지기만 하면 됨 * refactor: 경매 주기 시간에 대한 기준을 분 단위이고, 1시간을 넘지 않도록 검증하게 변경한다. - 기존에는 10분단위로 최대 60분이었음 - 변경한 부분은 분 단위면 가능하고, 1시간만 넘지 않도록 변경함 - 이에 경매 주기 시간을 더해 할인 주기 시간으로 나누었을때 나누어떨어지는 시간이어야 함 * chore: 테스트 스크립트 실패 확인을 위한 --info 옵션을 추가합니다 * feat: 임베디드 레디스 시작, 종료 시 로깅 추가 * feat: 테스트 마다 레디스 초기화 하도록 변경 * fix(test): 시간 정밀도 차이를 마이크로초까지 제한한 공통 LocalDateTime 필드를 사용하도록 테스트를 수정합니다. * feat: Entity에서 Enum값 `@Enumerated` 매핑 추가 * fix: 거래내역 ID 변경으로 인한 컴파일 에러 수정 - #310이 반영되면서 컴파일이 깨지는 오류를 수정합니다. --------- Co-authored-by: 유동근 <[email protected]> Co-authored-by: yudonggeun <[email protected]> * feat: core 모듈 추가 * refactor: 도메인, dto 이전 - core module : 도메인과 dto만으로 이루어진 모듈 - test module : 테스트에 필요한 유틸성 클래스를 포함한 모듈 * refactor: 도메인, dto 이전 - core module : 도메인과 dto만으로 이루어진 모듈 - test module : 테스트에 필요한 유틸성 클래스를 포함한 모듈 * refactor: api, redis consumer 모듈 생, 공통 모듈 생성 * refactor: 패키지 구조 개선 * refactor: core 패키지 분리 * refactor: consumer 패키지 분리 * refactor: api 패키지 분리 --------- Co-authored-by: MinSeok Oh <[email protected]> Co-authored-by: HyeonSik Choi <[email protected]> Co-authored-by: 이호석 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📄 Summary
현재 경매 하락 기준 시간은 1, 5, 10분으로 고정되어 있습니다. 이에 대한 제약을 좀 더 자유롭게 주기 위해서 제약 시간을 자유롭게 넣을 수 있게 변경했습니다.
경매 지속 시간 / 경매 가격 하락 주기 시간
연산을 했을때 나누어 떨어지는 시간이어야 합니다.🙋🏻 More
close #309