Skip to content

[#33] 마감된 경매 상태 변경 기능 - #34

Merged
JIWON27 merged 2 commits into
mainfrom
feature/33
Sep 19, 2026
Merged

JIWON27 merged 2 commits into
mainfrom
feature/33

Conversation

@JIWON27

@JIWON27 JIWON27 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

개요

  • 경매 마감 시각(extendedClosesAt)이 지났는데도 IN_PROGRESS 상태로 남아있는 경매를 주기적으로 찾아 낙찰(SUCCESSFUL)/유찰(FAILED)로 전환하는 스케줄러 추가 (MVP1 수준)
  • Auction.close(): 입찰 유무로 낙찰/유찰 여부를 판정하는 메서드 추가
  • AuctionRepository.findAllByStatusAndExtendedClosesAtBefore: 마감 시각이 지난 IN_PROGRESS 경매 조회용 쿼리 추가
  • AuctionCloseScheduler: @Scheduled(fixedDelayString = ...)로 주기 실행
    • 주기값은 application.yaml의 scheduler.auction-close.fixed-delay(기본 60초)로 외부에서 설정 가능
  • SchedulingConfig: @EnableScheduling을 별도 설정 클래스로 분리

메인 리뷰어 지정 및 Due Date

  • 메인 리뷰어 : blue , Due Date : 2026-09-20

리뷰 시 참고 사항

  • MVP1 단계에서는 단순하게 스케줄러로 주기적으로 경매 status를 변경해도 된다고 판단했습니다. 경매 목록 조회는 status와 마감시각+현재시간 비교를 함께 하기 때문에 스케줄러 실행 여부와 무관하게 마감된 경매가 노출되지 않습니다.
  • 근데 개별 경매 상세/상태 조회 API는 마감시각 + status 필터링 같은게없이 auctionId 기준으로 조회한값을 그대로 응답해주는 구조입니다. 그래서 경매 마감 직후부터 스케줄러가 실행되기 전까지 해당 경매 상태가 IN_PROGRESS로 보일 수 있습니다. 특히 사용자가 자신의 경매/입찰 결과를 보려고 상세 페이지를 열어둔 채 마감 시점에 새로고침하거나 폴링하는 경우엔 마감되더라도 IN_PROGRESS로 입찰 가능하다고 나올 것 입니다. 하지만 입찰 자체는 시간 검증이 별도로 있어 막히기 때문에 실질적인 피해는 없다고 판단했습니다.

TODO

References

[1] x

체크리스트

  • [v] PR 제목을 명령형으로 작성했습니다.
  • [v] PR을 연관되는 github issue에 연결했습니다.
  • [v] 리뷰 리퀘스트 전에 셀프 리뷰를 진행했습니다
  • [v] 변경사항에 대한 테스트코드를 추가했습니다. 또는, 테스트 코드가 필요없는 이유가 있습니다.

- Auction.close(): 입찰 유무(currentPrice > startPrice)로 SUCCESSFUL/FAILED 판정
- AuctionRepository.findAllByStatusAndExtendedClosesAtBefore 추가
- AuctionService.closeExpiredAuctions()에서 마감된 IN_PROGRESS 경매 일괄 마감 처리
- AuctionCloseScheduler: fixedDelay 기반 주기 실행 (scheduler.auction-close.fixed-delay, 기본 60초)
- SchedulingConfig에 @EnableScheduling 분리
@JIWON27 JIWON27 self-assigned this Sep 17, 2026
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 5d3b0379-3ce6-41b6-b582-88148f3fe87d


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JIWON27
JIWON27 requested a review from blue000927 September 17, 2026 14:55
@JIWON27 JIWON27 linked an issue Sep 17, 2026 that may be closed by this pull request
@sonarqubecloud

Copy link
Copy Markdown

@JIWON27
JIWON27 merged commit d37e29a into main Sep 19, 2026
3 checks passed
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.

[Task] 마감된 경매 상태 변경 기능

2 participants