From 8f2f35da0cbb07d8bf0d04468c8a2bdf5ee895e5 Mon Sep 17 00:00:00 2001 From: luofl <1442745593@qq.com> Date: 星期二, 11 三月 2025 10:47:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev-1.0.1' into dev-1.0.1 --- ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java index c1fa6e4..5fe61eb 100644 --- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java +++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java @@ -516,15 +516,19 @@ wrapper.orderByAsc(AuctionBidRecord::getLastBidTime); auctionBidRecordList = auctionBidRecordMapper.selectList(wrapper); Map<Long, String> orderIdMap = new HashMap<>(); - if(auctionBidRecordList.size()>0){ + if (auctionBidRecordList.size() > 0) { //判断 - if (auctionBidRecordList.size() >= auctionSalesroomGoods.getSalesroomStock()) { + if (auctionBidRecordList.size() >= auctionSalesroomGoods.getBidNum()) { for (int i = 0; i < auctionSalesroomGoods.getSalesroomStock(); i++) { AuctionBidRecord auctionBidRecord = auctionBidRecordList.get(i); auctionBidRecord.setStatus(BidStatusEnum.SUCCESSFUL); Long orderId = AddOrder(auctionBidRecord.getTargetId(), auctionBidRecord.getMemberId(), - auctionBidRecord.getLastBidAmount(), auctionSalesroom.getBond()); + auctionBidRecord.getLastBidAmount() + .multiply(new BigDecimal( + auctionSalesroomGoods.getDealQuantity())), + auctionSalesroom.getBond(), + auctionSalesroomGoods.getDealQuantity()); if (Objects.nonNull(orderId)) { orderIdMap.put(auctionBidRecord.getMemberId(), orderId.toString()); auctionBidRecord.setOrderId(orderId); @@ -544,7 +548,7 @@ auctionBidRecord.setStatus(BidStatusEnum.SUCCESSFUL); Long orderId = AddOrder(auctionBidRecord.getTargetId(), auctionBidRecord.getMemberId(), - auctionBidRecord.getLastBidAmount(), auctionSalesroom.getBond()); + auctionBidRecord.getLastBidAmount(), auctionSalesroom.getBond(), 1); if (Objects.nonNull(orderId)) { orderIdMap.put(auctionBidRecord.getMemberId(), orderId.toString()); auctionBidRecord.setOrderId(orderId); @@ -844,7 +848,7 @@ public Long AddOrder(Long goodsSkuId, Long memberId, BigDecimal lastBidAmount, - BigDecimal bound) { + BigDecimal bound, Integer goodsQuantity) { OrderDTO order=new OrderDTO(); order.setGoodsSkuId(goodsSkuId); order.setOrderTime(LocalDateTime.now()); @@ -852,7 +856,7 @@ order.setMemberId(memberId); AuctionSalesroomGoods auctionSalesroomGoods = this.getById(goodsSkuId); - order.setGoodsQuantity(1); + order.setGoodsQuantity(goodsQuantity); order.setTotalAmount(lastBidAmount); order.setAuctionSalesroomId(auctionSalesroomGoods.getAuctionSalesroomId()); -- Gitblit v1.7.1