From d5a62c975afbaff26d17b61fa7b9fde7e2cb035d Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期六, 27 七月 2024 11:44:03 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java
index 987e1c0..85b153c 100644
--- a/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java
+++ b/ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java
@@ -326,7 +326,7 @@
                     }
                 } else {
                     // 中标
-                    for (int i = 0; i < auctionGoods.getAuctionStock(); i++) {
+                    for (int i = 0; i < auctionBidRecords.size(); i++) {
                         AuctionBidRecord auctionBidRecord = auctionBidRecords.get(i);
                         auctionBidRecord.setStatus(BidStatusEnum.SUCCESSFUL);
                         auctionBidRecordList.add(auctionBidRecord);
@@ -335,7 +335,7 @@
                     GoodsStockUpdDTO goodsStockUpdDTO = new GoodsStockUpdDTO();
                     goodsStockUpdDTO.setGoodsSkuId(auctionGoods.getGoodsSkuId());
                     goodsStockUpdDTO.setAuctionStock(
-                            auctionGoods.getAuctionStock() - auctionBidRecordList.size());
+                            auctionGoods.getAuctionStock() - auctionBidRecords.size());
                     goodsSkuClient.updGoodsStock(Lists.newArrayList(goodsStockUpdDTO),
                             SecurityConstants.INNER);
                 }
@@ -521,7 +521,6 @@
         auctionGoodsinfoVO.setSpec(goodsSkuOne.getSpec());
         auctionGoodsinfoVO.setSpecUnit(goodsSkuOne.getSpecUnit());
         auctionGoodsinfoVO.setShareTitle(goodsSkuOne.getShareTitle());
-        auctionGoodsinfoVO.setSpecUnit(goodsSkuOne.getSpecUnit());
         auctionGoodsinfoVO.setDetail(goodsSkuOne.getDetail());
         auctionGoodsinfoVO.setBond(byId.getBond());
         auctionGoodsinfoVO.setYears(goodsSkuOne.getYears());
@@ -565,11 +564,14 @@
             auctionGoodsinfoVO.setIsCollection(1);
         }
         List<OrderAuctionBond> datas = orderClient.getAuctionGoodsOrderAuctionBondList(auctionGoodsListDTO, SecurityConstants.INNER).getData();
-        if (datas.size()>0){
-            auctionGoodsinfoVO.setIsApply(2);
-        }else{
-            auctionGoodsinfoVO.setIsApply(1);
-        }
+       if(datas!=null){
+           if (datas.size()>0){
+               auctionGoodsinfoVO.setIsApply(2);
+           }else{
+               auctionGoodsinfoVO.setIsApply(1);
+           }
+
+       }
 
         LocalDateTime now = LocalDateTime.now();
         LocalDateTime newTime7 = now.minusDays(7);
@@ -651,7 +653,7 @@
         Page<AuctionGoodsListVO> page = new Page<>();
         page.setSize(auctionGoodsListDTO.getPageSize());
         page.setCurrent(auctionGoodsListDTO.getPageCurr());
-        List<AuctionGoods> auctionGoodsPgeList = auctionGoodsMapper.getAuctionGoodsPgeList(page, auctionGoodsListPageDTO);
+        List<AuctionGoods> auctionGoodsPgeList = auctionGoodsMapper.getAuctionGoodsPgeList1(page, auctionGoodsListPageDTO);
         List<AuctionGoodsListVO> auctionGoodsVOS=new ArrayList<>();
         for (AuctionGoods auctionGoods:auctionGoodsPgeList){
             AuctionGoodsListVO auctionGoodsVO=new AuctionGoodsListVO();
@@ -718,7 +720,7 @@
                         }
                     } else {
                         // 中标
-                        for (int i = 0; i < auctionGoods.getAuctionStock(); i++) {
+                        for (int i = 0; i < auctionBidRecords.size(); i++) {
                             AuctionBidRecord auctionBidRecord = auctionBidRecords.get(i);
                             auctionBidRecord.setStatus(BidStatusEnum.SUCCESSFUL);
                             auctionBidRecordList.add(auctionBidRecord);

--
Gitblit v1.7.1