Skip to content

Commit

Permalink
Fix: produce response updatedAt -> lastBidding으로 수정 (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
klkim1913 authored Aug 16, 2023
1 parent 273bf46 commit 93a9ca0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static AuctionResponse toResponse(Auction auction) {
.id(auction.getId())
.price(auction.getPrice())
.nickname(auction.getNickname())
.updatedAt(auction.getUpdatedAt())
.updatedAt(auction.getLastBidding())
.status(auction.isClosed())
.build();
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/anywayclear/service/AuctionService.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public BiddingResponse Bidding(long auctionId, String consumerId, BiddingRequest
throw new CustomException(INVALID_AUCTION_STATUS);
}
/* 테스트동안 제한 안함 */
// if (LocalDateTime.now().isAfter(auction.getUpdatedAt().plusMinutes(5))) {
// throw new CustomException(EXPIRED_AUCTION_TIME);
// }
if (LocalDateTime.now().isAfter(auction.getUpdatedAt().plusMinutes(4))) {
throw new CustomException(EXPIRED_AUCTION_TIME);
}
Member consumer = memberRepository.findByUserId(consumerId).orElseThrow(() -> new CustomException(INVALID_MEMBER));
if (request.getPrice() < auction.getPrice() + 100) { // 가격 기준 정해지면 수정할 로직
throw new CustomException(INVALID_PRICE);
Expand Down

0 comments on commit 93a9ca0

Please sign in to comment.