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

[FEATURE] 판매자가 경매를 수정하면 영구적으로 변경이 반영된다. #146

Closed
4 tasks done
Tracked by #9
yudonggeun opened this issue Aug 14, 2024 · 0 comments · Fixed by #212
Closed
4 tasks done
Tracked by #9
Assignees
Labels
FEATURE 새로운 기능 또는 변경

Comments

@yudonggeun
Copy link
Contributor

yudonggeun commented Aug 14, 2024

Author: @chhs2131

✨ Describe

persistence layer 연동

✅ Todo

  • Auction 영속성 엔티티와 도메인 엔티티를 변환하는 로직을 구현한다.
    • Mapper 로직 구현
    • Test 필요
  • AuctionRepository의 save 기능을 구현한다.
    • AuctionCoreRepository.save 로직 구현
    • Test 필요
  • AuctionServce.changeStock 을 동작시킨다.
    • AuctionService
    • 수정 사항 없음

More

기존 존재하던 AuctionService.changeStock에서 이용하는 AuctionRepository.save의 내부 기능을 구현함으로써 해당 테스크를 완료할 수 있습니다.

    public void changeStock(SignInInfo signInInfo, UpdateAuctionStockCommand command) {
        if (!signInInfo.isType(Role.SELLER)) {
            throw new UnauthorizedException("판매자만 재고를 수정할 수 있습니다.", ErrorCode.A017);
        }
        Auction auction = findAuctionObject(command.auctionId());
        auction.changeStock(command.changeRequestStock(), command.requestTime(), signInInfo.id());

        auctionRepository.save(auction);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEATURE 새로운 기능 또는 변경
Projects
None yet
2 participants