From d91d49d51503a22a424a5600b8bfa7586cf3cd91 Mon Sep 17 00:00:00 2001
From: rentaiming <806181062@qq.com>
Date: 星期五, 21 六月 2024 20:15:46 +0800
Subject: [PATCH] 用户端商品

---
 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionGoodsServiceImpl.java          |   14 ++
 ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomGoodsServiceImpl.java |   77 ++++++++++---------
 ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/AuctionSalesroomVO.java                |    3 
 ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java                  |   92 +++++++++++++---------
 ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java                     |    7 +
 5 files changed, 114 insertions(+), 79 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/AuctionSalesroomVO.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/AuctionSalesroomVO.java
index d1e452b..c1d8375 100644
--- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/AuctionSalesroomVO.java
+++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/vo/AuctionSalesroomVO.java
@@ -53,4 +53,7 @@
     @JsonInclude(JsonInclude.Include.ALWAYS)
     private List<ForepartAuctionSalesroomGoodsVO> elseAuctionSalesroomGoods;
 
+    @ApiModelProperty(value = "商品信息")
+    private  List<getHomeGoodsSkuXxiVO> xiq;
+
 }
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 3ff8451..8516be3 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
@@ -440,10 +440,18 @@
         GoodsCategory data1 = goodsSkuClient.getCategoryOne(goodsSkuOne.getCategoryId(), SecurityConstants.INNER).getData();
         GoodsSeries data2 = goodsSkuClient.getSeriesOne(goodsSkuOne.getSeriesId(), SecurityConstants.INNER).getData();
         GoodsFlavorType data3 = goodsSkuClient.getFlavorTypeOne(goodsSkuOne.getFlavorTypeId(), SecurityConstants.INNER).getData();
-        auctionGoodsinfoVO.setBrand(data.getBrandName());
-        auctionGoodsinfoVO.setCategory(data1.getCategoryName());
+        if (data!=null){
+            auctionGoodsinfoVO.setBrand(data.getBrandName());
+        }
+        if (data1!=null){
+           auctionGoodsinfoVO.setCategory(data1.getCategoryName());
+        }
+            if (data2!=null){
         auctionGoodsinfoVO.setSeries(data2.getSeriesName());
-        auctionGoodsinfoVO.setFlavorType(data3.getFlavorTypeName());
+            }
+                if (data3!=null) {
+                    auctionGoodsinfoVO.setFlavorType(data3.getFlavorTypeName());
+                }
         auctionGoodsinfoVO.setCoverPic(goodsSkuOne.getCoverPic());
         auctionGoodsinfoVO.setAlbum(goodsSkuOne.getAlbum());
         auctionGoodsinfoVO.setAuthentication(byId.getAuthentication());
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 0312b25..9d38fbe 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
@@ -23,34 +23,20 @@
 import com.ruoyi.common.core.enums.OrderFromEnum;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.system.api.constants.NotificationTypeConstant;
-import com.ruoyi.system.api.domain.AuctionSalesroom;
-import com.ruoyi.system.api.domain.CustomConfig;
-import com.ruoyi.system.api.domain.GoodsBrand;
-import com.ruoyi.system.api.domain.GoodsCategory;
-import com.ruoyi.system.api.domain.GoodsFlavorType;
-import com.ruoyi.system.api.domain.GoodsSeries;
-import com.ruoyi.system.api.domain.GoodsSku;
-import com.ruoyi.system.api.domain.Member;
-import com.ruoyi.system.api.domain.MemberAddress;
-import com.ruoyi.system.api.domain.Order;
+import com.ruoyi.system.api.domain.*;
 import com.ruoyi.system.api.domain.dto.AuctionSalesroomDTO;
 import com.ruoyi.system.api.domain.dto.AuctionSalesroomGoodsInfoDTO;
 import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO;
 import com.ruoyi.system.api.domain.dto.OrderAuctionBondDTO;
 import com.ruoyi.system.api.domain.dto.OrderDTO;
-import com.ruoyi.system.api.domain.vo.AuctionBidRecordVO;
-import com.ruoyi.system.api.domain.vo.AuctionSalesroomGoodsInfoVO;
-import com.ruoyi.system.api.domain.vo.AuctionSalesroomVO;
-import com.ruoyi.system.api.domain.vo.ForepartAuctionSalesroomGoodsVO;
+import com.ruoyi.system.api.domain.vo.*;
 import com.ruoyi.system.api.feignClient.GoodsSkuClient;
 import com.ruoyi.system.api.feignClient.MemberClient;
 import com.ruoyi.system.api.feignClient.OrderClient;
 import com.ruoyi.system.api.feignClient.SysUserClient;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import javax.annotation.Resource;
 import org.springframework.stereotype.Service;
@@ -214,7 +200,7 @@
                         auctionSalesroomGoods.getGoodsSkuId(), SecurityConstants.INNER);
                 GoodsSku goodsSku=goodsSkuOne.getData();
                 currentAuctionSalesroomGoods.setGoodsSkuName(goodsSku.getSkuName());
-                currentAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods.getGoodsSkuId());
+                currentAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods.getId());
                 currentAuctionSalesroomGoods.setCoverPic(goodsSku.getCoverPic());
                 currentAuctionSalesroomGoods.setStartTime(auctionSalesroomGoods.getStartTime());
                 currentAuctionSalesroomGoods.setGoodsSkustatus(auctionSalesroomGoods.getStatus());
@@ -225,6 +211,7 @@
             LambdaQueryWrapper<AuctionSalesroomGoods> wrapper1=Wrappers.lambdaQuery();
             wrapper1.eq(AuctionSalesroomGoods::getDelFlag,0);
             wrapper1.eq(AuctionSalesroomGoods::getStatus,0);
+            wrapper1.eq(AuctionSalesroomGoods::getAuctionSalesroomId,ationSalesroomGoodsDTO.getAuctionSalesroomId());
             if (auctionSalesroomGoods!=null) {
                 wrapper1.eq(AuctionSalesroomGoods::getSortNum, auctionSalesroomGoods.getSortNum() + 1);
                 list.add(auctionSalesroomGoods.getSortNum()+1);
@@ -241,7 +228,7 @@
                             auctionSalesroomGoodss.getGoodsSkuId(), SecurityConstants.INNER);
                     GoodsSku goodsSku=goodsSkuOne.getData();
                     currentAuctionSalesroomGoods.setGoodsSkuName(goodsSku.getSkuName());
-                    currentAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoodss.getGoodsSkuId());
+                    currentAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoodss.getId());
                     currentAuctionSalesroomGoods.setCoverPic(goodsSku.getCoverPic());
                     currentAuctionSalesroomGoods.setStartTime(auctionSalesroomGoodss.getStartTime());
                     currentAuctionSalesroomGoods.setGoodsSkustatus(auctionSalesroomGoodss.getStatus());
@@ -264,7 +251,7 @@
                 nextAuctionSalesroomGoods.setNextGoodsSkuName(goodsSku1.getSkuName());
                 nextAuctionSalesroomGoods.setCoverPic(goodsSku1.getCoverPic());
                 nextAuctionSalesroomGoods.setGoodsSkustatus(auctionSalesroomGoods1.getStatus());
-                nextAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods1.getGoodsSkuId());
+                nextAuctionSalesroomGoods.setGoodsSkuId(auctionSalesroomGoods1.getId());
                 auctionSalesroomVO.setNextAuctionSalesroomGoods(nextAuctionSalesroomGoods);
             }
             LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery();
@@ -282,7 +269,7 @@
                 GoodsSku goodsSku2=goodsSkuOne2.getData();
                 forepartAuctionSalesroomGoodsVO1.setGoodsSkuName(goodsSku2.getSkuName());
                 forepartAuctionSalesroomGoodsVO1.setCoverPic(goodsSku2.getCoverPic());
-                forepartAuctionSalesroomGoodsVO1.setGoodsSkuId(salesroomGoods.getGoodsSkuId());
+                forepartAuctionSalesroomGoodsVO1.setGoodsSkuId(salesroomGoods.getId());
                 forepartAuctionSalesroomGoodsVO1.setGoodsSkustatus(salesroomGoods.getStatus());
                 auctionSalesroomGoodsVOS.add(forepartAuctionSalesroomGoodsVO1);
             }
@@ -324,8 +311,6 @@
             auctionSalesroomGoods.setStartTime(LocalDateTime.now());
             this.updateById(auctionSalesroomGoods);
         }
-
-
         Map<String, Object> map = new ConcurrentHashMap<>();
         map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM);
         map.put("auctionSalesroomId", auctionSalesroom.getId());
@@ -429,7 +414,7 @@
         LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery();
         wrapper2.eq(AuctionSalesroomGoods::getAuctionSalesroomId,auctionSalesroomGoodsDTO.getAuctionSalesroomId());
         wrapper2.eq(AuctionSalesroomGoods::getDelFlag,0);
-        wrapper2.eq(AuctionSalesroomGoods::getGoodsSkuId,auctionSalesroomGoodsDTO.getGoodsSkuId());
+        wrapper2.eq(AuctionSalesroomGoods::getId,auctionSalesroomGoodsDTO.getGoodsSkuId());
         AuctionSalesroomGoods auctionSalesroomGoods=this.getOne(wrapper2);
         auctionSalesroomGoods.setStatus(AuctionGoodsStatusEnum.IN_PROGRESS);
         auctionSalesroomGoods.setStartTime(LocalDateTime.now());
@@ -438,9 +423,10 @@
        Map<String, Object> map = new ConcurrentHashMap<>();
         map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM_GOODS);
         map.put("notification_time", DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
-        map.put("goodsSkuId", auctionSalesroomGoods.getId());
+        map.put("goodsSkuId", auctionSalesroomGoods.getId().toString());
+        map.put("auctionSalesroomId", auctionSalesroomGoods.getAuctionSalesroomId().toString());
         map.put("message_type", "start");
-        map.put("type",1);
+        map.put("type",2);
         map.put("AuctionGoodsStatusEnum",auctionSalesroomGoods.getStatus());
         String msg = null;
         try {
@@ -462,7 +448,7 @@
         LambdaQueryWrapper<AuctionSalesroomGoods> wrapper2=Wrappers.lambdaQuery();
         wrapper2.eq(AuctionSalesroomGoods::getAuctionSalesroomId,auctionSalesroomGoodsDTO.getAuctionSalesroomId());
         wrapper2.eq(AuctionSalesroomGoods::getDelFlag,0);
-        wrapper2.eq(AuctionSalesroomGoods::getGoodsSkuId,auctionSalesroomGoodsDTO.getGoodsSkuId());
+        wrapper2.eq(AuctionSalesroomGoods::getId,auctionSalesroomGoodsDTO.getGoodsSkuId());
         AuctionSalesroomGoods auctionSalesroomGoods=this.getOne(wrapper2);
         AuctionSalesroom auctionSalesroom=iAuctionSalesroomService.getById(auctionSalesroomGoodsDTO.getAuctionSalesroomId());
 
@@ -478,7 +464,7 @@
             if(auctionBidRecordList.size()>0){
                 //判断
                 if (auctionBidRecordList.size() >= auctionSalesroomGoods.getSalesroomStock()) {
-                    for (int i = 0; i <= auctionSalesroomGoods.getSalesroomStock(); i++) {
+                    for (int i = 0; i < auctionSalesroomGoods.getSalesroomStock(); i++) {
                         AuctionBidRecord auctionBidRecord = auctionBidRecordList.get(i);
                         auctionBidRecord.setStatus(BidStatusEnum.SUCCESSFUL);
                         AddOrder(auctionBidRecord.getTargetId(), auctionBidRecord.getMemberId(),
@@ -492,7 +478,7 @@
                             SecurityConstants.INNER);
 
 
-                    for (int i = 0; i <= auctionBidRecordList.size(); i++) {
+                    for (int i = 0; i < auctionBidRecordList.size(); i++) {
                         AuctionBidRecord auctionBidRecord = auctionBidRecordList.get(i);
                         auctionBidRecord.setStatus(BidStatusEnum.SUCCESSFUL);
                         AddOrder(auctionBidRecord.getTargetId(), auctionBidRecord.getMemberId(),
@@ -508,7 +494,8 @@
        Map<String, Object> map = new ConcurrentHashMap<>();
         map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM_GOODS);
         map.put("notification_time", DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
-        map.put("goodsSkuId", auctionSalesroomGoods.getId());
+        map.put("goodsSkuId", auctionSalesroomGoods.getId().toString());
+        map.put("auctionSalesroomId", auctionSalesroomGoods.getAuctionSalesroomId().toString());
         map.put("message_type", "end");
         map.put("type",2);
         map.put("AuctionGoodsStatusEnum",auctionSalesroomGoods.getStatus());
@@ -548,10 +535,18 @@
         GoodsCategory data1 = goodsSkuClient.getCategoryOne(goodsSku.getCategoryId(), SecurityConstants.INNER).getData();
         GoodsSeries data2 = goodsSkuClient.getSeriesOne(goodsSku.getSeriesId(), SecurityConstants.INNER).getData();
         GoodsFlavorType data3 = goodsSkuClient.getFlavorTypeOne(goodsSku.getFlavorTypeId(), SecurityConstants.INNER).getData();
-        AuctionSalesroomGoodsInfoVO.setBrand(data.getBrandName());
+        if(data!=null){
+            AuctionSalesroomGoodsInfoVO.setBrand(data.getBrandName());
+        }
+        if(data1!=null){
         AuctionSalesroomGoodsInfoVO.setCategory(data1.getCategoryName());
+        }
+            if(data2!=null){
         AuctionSalesroomGoodsInfoVO.setSeries(data2.getSeriesName());
+            }
+                if(data3!=null){
         AuctionSalesroomGoodsInfoVO.setFlavorType(data3.getFlavorTypeName());
+                }
         AuctionSalesroomGoodsInfoVO.setCoverPic(goodsSku.getCoverPic());
         AuctionSalesroomGoodsInfoVO.setAlbum(goodsSku.getAlbum());
         AuctionSalesroomGoodsInfoVO.setSpec(goodsSku.getSpec());
@@ -598,6 +593,15 @@
         if (list2!=null){
             AuctionSalesroomGoodsInfoVO.setZgBid(list2.getLastBidAmount());
         }
+
+    /*    List<GoodsInfoTitleValueVO> goodsInfoTitleValueVOList = goodsInfoTitleValueService.listByGoodsId(homeGoodsSkuDTO.getGoodsSkuId());
+        Collections.sort(goodsInfoTitleValueVOList, Comparator.comparingInt(GoodsInfoTitleValueVO::getSortNum));
+        for (GoodsInfoTitleValueVO goodsInfoTitleValueVO:goodsInfoTitleValueVOList){
+            getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVOs=new getHomeGoodsSkuXxiVO();
+            getHomeGoodsSkuXxiVOs.setContent(goodsInfoTitleValueVO.getContent());
+            getHomeGoodsSkuXxiVOs.setTitleName(goodsInfoTitleValueVO.getTitleName());
+            homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVOs);
+        }*/
 
         return AuctionSalesroomGoodsInfoVO;
     }
@@ -675,12 +679,13 @@
         Double aDouble= Double.valueOf(memberPointsMoney.getConfigValue()) * Double.valueOf(memberPointsPoints.getConfigValue());
         BigDecimal pi=lastBidAmount.multiply(new BigDecimal(aDouble));
         order.setPoints(pi.intValue());
+        if (memberAddress!=null){
+            order.setReceiverCity(memberAddress.getCity());
+            order.setReceiverDetailAddress(memberAddress.getDetailedAddress());
+            order.setReceiverphone(memberAddress.getRecipientPhone());
+            order.setReceiverName(memberAddress.getRecipientName());
+        }
 
-
-        order.setReceiverCity(memberAddress.getCity());
-        order.setReceiverDetailAddress(memberAddress.getDetailedAddress());
-        order.setReceiverphone(memberAddress.getRecipientPhone());
-        order.setReceiverName(memberAddress.getRecipientName());
         order.setBound(bound);
         order.setAuctionType(AuctionOrderTypeEnum.AUCTION_ITEMS);
         GoodsSku goodsSku = goodsSkuClient.getGoodsSkuOne(auctionSalesroomGoods.getGoodsSkuId(), SecurityConstants.INNER)
diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java
index 8c568ef..be9b71f 100644
--- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java
+++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSkuServiceImpl.java
@@ -412,10 +412,18 @@
         GoodsCategory data1 = goodsSkuClient.getCategoryOne(byId.getCategoryId(), SecurityConstants.INNER).getData();
         GoodsSeries data2 = goodsSkuClient.getSeriesOne(byId.getSeriesId(), SecurityConstants.INNER).getData();
         GoodsFlavorType data3 = goodsSkuClient.getFlavorTypeOne(byId.getFlavorTypeId(), SecurityConstants.INNER).getData();
-        homeGoodsSkuInfoVO.setBrand(data.getBrandName());
+        if (data!=null){
+            homeGoodsSkuInfoVO.setBrand(data.getBrandName());
+        }
+        if (data1!=null){
         homeGoodsSkuInfoVO.setCategory(data1.getCategoryName());
+        }
+        if (data2!=null){
         homeGoodsSkuInfoVO.setSeries(data2.getSeriesName());
-        homeGoodsSkuInfoVO.setFlavorType(data3.getFlavorTypeName());
+        }
+        if (data3!=null) {
+            homeGoodsSkuInfoVO.setFlavorType(data3.getFlavorTypeName());
+        }
         homeGoodsSkuInfoVO.setPrice(byId.getPrice());
         homeGoodsSkuInfoVO.setSoldQuantity(byId.getSoldQuantity());
         homeGoodsSkuInfoVO.setUnit(byId.getUnit());
@@ -481,26 +489,31 @@
         GoodsFlavorType data3 = goodsSkuClient.getFlavorTypeOne(byId.getFlavorTypeId(), SecurityConstants.INNER).getData();
 
 
-        getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO1=new getHomeGoodsSkuXxiVO();
-        getHomeGoodsSkuXxiVO1.setContent(data1.getCategoryName());
-        getHomeGoodsSkuXxiVO1.setTitleName("分类");
-        homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO1);
+        if (data1!=null){
+            getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO1=new getHomeGoodsSkuXxiVO();
+            getHomeGoodsSkuXxiVO1.setContent(data1.getCategoryName());
+            getHomeGoodsSkuXxiVO1.setTitleName("分类");
+            homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO1);
+        }
 
+        if (data2!=null){
         getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO2=new getHomeGoodsSkuXxiVO();
         getHomeGoodsSkuXxiVO2.setContent(data2.getSeriesName());
         getHomeGoodsSkuXxiVO2.setTitleName("系列");
         homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO2);
-
-        getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO=new getHomeGoodsSkuXxiVO();
-        getHomeGoodsSkuXxiVO.setContent(data.getBrandName());
-        getHomeGoodsSkuXxiVO.setTitleName("品牌");
-        homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO);
-
-        getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO3=new getHomeGoodsSkuXxiVO();
-        getHomeGoodsSkuXxiVO3.setContent(data3.getFlavorTypeName());
-        getHomeGoodsSkuXxiVO3.setTitleName("香型");
-        homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO3);
-
+        }
+        if (data!=null) {
+            getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO = new getHomeGoodsSkuXxiVO();
+            getHomeGoodsSkuXxiVO.setContent(data.getBrandName());
+            getHomeGoodsSkuXxiVO.setTitleName("品牌");
+            homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO);
+        }
+        if (data3!=null) {
+            getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO3 = new getHomeGoodsSkuXxiVO();
+            getHomeGoodsSkuXxiVO3.setContent(data3.getFlavorTypeName());
+            getHomeGoodsSkuXxiVO3.setTitleName("香型");
+            homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO3);
+        }
 
         List<GoodsInfoTitleValueVO> goodsInfoTitleValueVOList = goodsInfoTitleValueService.listByGoodsId(homeGoodsSkuDTO.getGoodsSkuId());
         Collections.sort(goodsInfoTitleValueVOList, Comparator.comparingInt(GoodsInfoTitleValueVO::getSortNum));
@@ -524,28 +537,31 @@
         GoodsCategory data1 = goodsSkuClient.getCategoryOne(byId.getCategoryId(), SecurityConstants.INNER).getData();
         GoodsSeries data2 = goodsSkuClient.getSeriesOne(byId.getSeriesId(), SecurityConstants.INNER).getData();
         GoodsFlavorType data3 = goodsSkuClient.getFlavorTypeOne(byId.getFlavorTypeId(), SecurityConstants.INNER).getData();
+        if (data!=null){
+            getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO1=new getHomeGoodsSkuXxiVO();
+            getHomeGoodsSkuXxiVO1.setContent(data1.getCategoryName());
+            getHomeGoodsSkuXxiVO1.setTitleName("分类");
+            homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO1);
+        }
 
-
-        getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO1=new getHomeGoodsSkuXxiVO();
-        getHomeGoodsSkuXxiVO1.setContent(data1.getCategoryName());
-        getHomeGoodsSkuXxiVO1.setTitleName("分类");
-        homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO1);
-
-        getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO2=new getHomeGoodsSkuXxiVO();
-        getHomeGoodsSkuXxiVO2.setContent(data2.getSeriesName());
-        getHomeGoodsSkuXxiVO2.setTitleName("系列");
-        homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO2);
-
-        getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO=new getHomeGoodsSkuXxiVO();
-        getHomeGoodsSkuXxiVO.setContent(data.getBrandName());
-        getHomeGoodsSkuXxiVO.setTitleName("品牌");
-        homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO);
-
-        getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO3=new getHomeGoodsSkuXxiVO();
-        getHomeGoodsSkuXxiVO3.setContent(data3.getFlavorTypeName());
-        getHomeGoodsSkuXxiVO3.setTitleName("香型");
-        homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO3);
-
+        if (data2!=null) {
+            getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO2 = new getHomeGoodsSkuXxiVO();
+            getHomeGoodsSkuXxiVO2.setContent(data2.getSeriesName());
+            getHomeGoodsSkuXxiVO2.setTitleName("系列");
+            homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO2);
+        }
+        if (data!=null) {
+            getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO = new getHomeGoodsSkuXxiVO();
+            getHomeGoodsSkuXxiVO.setContent(data.getBrandName());
+            getHomeGoodsSkuXxiVO.setTitleName("品牌");
+            homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO);
+        }
+        if (data3!=null) {
+            getHomeGoodsSkuXxiVO getHomeGoodsSkuXxiVO3 = new getHomeGoodsSkuXxiVO();
+            getHomeGoodsSkuXxiVO3.setContent(data3.getFlavorTypeName());
+            getHomeGoodsSkuXxiVO3.setTitleName("香型");
+            homeGoodsSkuXxiVOS.add(getHomeGoodsSkuXxiVO3);
+        }
 
         List<GoodsInfoTitleValueVO> goodsInfoTitleValueVOList = goodsInfoTitleValueService.listByGoodsId(homeGoodsSkuDTO.getGoodsSkuId());
         Collections.sort(goodsInfoTitleValueVOList, Comparator.comparingInt(GoodsInfoTitleValueVO::getSortNum));
diff --git a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
index 5d0f6ee..d853c97 100644
--- a/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
+++ b/ruoyi-modules/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -188,8 +188,11 @@
                 wrapper.eq(OrderAuctionBond::getAuctionSalesroomId,OrderDTO.getAuctionSalesroomId());
                 wrapper.eq(OrderAuctionBond::getBondType,2);
                 OrderAuctionBond orderAuctionBond = orderAuctionBondMapper.selectOne(wrapper);
-                orderAuctionBond.setOrderId(order.getId());
-                orderAuctionBondMapper.updateById(orderAuctionBond);
+                if (orderAuctionBond!=null){
+                    orderAuctionBond.setOrderId(order.getId());
+                    orderAuctionBondMapper.updateById(orderAuctionBond);
+                }
+
             }
 
         }

--
Gitblit v1.7.1