From f6d532c6c5c95e3701ae01b1b31b4439b69f978e Mon Sep 17 00:00:00 2001 From: Phung Huu Thanh <102614541+phuuthanh2003@users.noreply.github.com> Date: Mon, 22 Jul 2024 03:52:16 +0700 Subject: [PATCH] a --- .../backend/auction/service/bid/AuctionHistoryServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/vn/webapp/backend/auction/service/bid/AuctionHistoryServiceImpl.java b/src/main/java/vn/webapp/backend/auction/service/bid/AuctionHistoryServiceImpl.java index cbaed3c..04c645f 100644 --- a/src/main/java/vn/webapp/backend/auction/service/bid/AuctionHistoryServiceImpl.java +++ b/src/main/java/vn/webapp/backend/auction/service/bid/AuctionHistoryServiceImpl.java @@ -129,7 +129,7 @@ public void deleteBidByUserAndAuction(Integer userId, Integer auctionId, String List lastActiveBids = auctionHistoryRepository.findLastActiveBidByAuctionId(auctionId); if (!lastActiveBids.isEmpty()) { AuctionHistory lastActiveBid = lastActiveBids.get(0); - if (lastActiveBid.getPriceGiven() < auction.getJewelry().getBuyNowPrice()) { + if (lastActiveBid.getPriceGiven() < auction.getJewelry().getBuyNowPrice() && auction.getEndDateStored() != null) { auction.setEndDate(auction.getEndDateStored()); } auction.setLastPrice(lastActiveBid.getPriceGiven());