From 518e95ed707f699f15d7606ef655d77ded823979 Mon Sep 17 00:00:00 2001 From: Chanwoong Park <128444378+chanchanwoong@users.noreply.github.com> Date: Mon, 1 Jul 2024 02:14:54 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20builder=20=EC=88=98=EC=A0=95(#261)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auction/application/impl/AuctionServiceImpl.java | 11 +++++++++++ .../skyhorsemanpower/auction/domain/RoundInfo.java | 1 + 2 files changed, 12 insertions(+) diff --git a/src/main/java/com/skyhorsemanpower/auction/application/impl/AuctionServiceImpl.java b/src/main/java/com/skyhorsemanpower/auction/application/impl/AuctionServiceImpl.java index 2677d9e..e6a5a30 100644 --- a/src/main/java/com/skyhorsemanpower/auction/application/impl/AuctionServiceImpl.java +++ b/src/main/java/com/skyhorsemanpower/auction/application/impl/AuctionServiceImpl.java @@ -156,6 +156,17 @@ public void auctionClose(String auctionUuid) { roundInfoRepository.save(RoundInfo.builder() .auctionUuid(auctionUuid) + .round(currenctRoundInfo.getRound()) + .roundStartTime(currenctRoundInfo.getRoundStartTime()) + .roundEndTime(currenctRoundInfo.getRoundEndTime()) + .incrementUnit(currenctRoundInfo.getIncrementUnit()) + .price(currenctRoundInfo.getPrice()) + .isActive(true) + .numberOfParticipants(currenctRoundInfo.getNumberOfParticipants()) + .leftNumberOfParticipants(currenctRoundInfo.getLeftNumberOfParticipants()) + .createdAt(LocalDateTime.now()) + .auctionEndTime(currenctRoundInfo.getAuctionEndTime()) + .isLastRound(currenctRoundInfo.getIsLastRound()) .endStatus(true) .build()); } diff --git a/src/main/java/com/skyhorsemanpower/auction/domain/RoundInfo.java b/src/main/java/com/skyhorsemanpower/auction/domain/RoundInfo.java index 324eaba..eaf8407 100644 --- a/src/main/java/com/skyhorsemanpower/auction/domain/RoundInfo.java +++ b/src/main/java/com/skyhorsemanpower/auction/domain/RoundInfo.java @@ -56,6 +56,7 @@ public RoundInfo(String auctionUuid, Integer round, LocalDateTime roundStartTime this.createdAt = LocalDateTime.now(); this.auctionEndTime = auctionEndTime; this.isLastRound = isLastRound; + this.endStatus = endStatus; } public static RoundInfo nextRoundUpdate(RoundInfo roundInfo) {