From 2427b05aeca08ee3c4998843bf749d35440d461b Mon Sep 17 00:00:00 2001
From: rentaiming <806181662@qq.com>
Date: 星期六, 15 六月 2024 21:33:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java
index d9ebce2..2ce38af 100644
--- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java
+++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/MemberGoodsCollectionServiceImpl.java
@@ -63,12 +63,14 @@
         LambdaQueryWrapper< MemberGoodsCollection> wrapper= Wrappers.lambdaQuery();
         wrapper.eq(MemberGoodsCollection::getMemberId,auctionCollectionDTO.getMemberId());
         wrapper.eq(MemberGoodsCollection::getTargetId,auctionCollectionDTO.getGoodsSkuId());
+        wrapper.eq(MemberGoodsCollection::getType,auctionCollectionDTO.getType());
         if (auctionCollectionDTO.getState()==1){
             List<MemberGoodsCollection> list = this.list(wrapper);
             if (list.size()==0){
                 MemberGoodsCollection m =new MemberGoodsCollection();
                 m.setMemberId(auctionCollectionDTO.getMemberId());
                 m.setTargetId(auctionCollectionDTO.getGoodsSkuId());
+                m.setType(auctionCollectionDTO.getType());
                 this.save(m);
             }
         }else{
@@ -119,13 +121,14 @@
                 auctionGoodsVO.setSkuName(goodsSku.getSkuName());
                 auctionGoodsVO.setSoldQuantity(goodsSku.getSoldQuantity());
                 auctionGoodsVO.setIsCollection(2);
+                auctionGoodsVO.setType(auctionCollection.getType());
                 auctionGoodsVOS.add(auctionGoodsVO);
-            }   if(auctionCollection.getType()==2){
+            }   if(auctionCollection.getType()==3){
                 HomeGoodsSkuListVO auctionGoodsVO=new HomeGoodsSkuListVO();
                 GoodsSeckill goodsSeckill = goodsSeckillMapper.selectById(auctionCollection.getTargetId());
                 GoodsSku goodsSku = goodsSkuMapper.selectById(goodsSeckill.getGoodsSkuId());
                 auctionGoodsVO.setId(auctionCollection.getTargetId());
-                auctionGoodsVO.setPrice(goodsSku.getPrice());
+                auctionGoodsVO.setPrice( goodsSeckill.getSeckillPrice());
                 auctionGoodsVO.setCoverPic(goodsSku.getCoverPic());
                 auctionGoodsVO.setSkuName(goodsSku.getSkuName());
                 auctionGoodsVO.setSoldQuantity(goodsSku.getSoldQuantity());
@@ -133,22 +136,24 @@
                 auctionGoodsVO.setStartStatus(goodsSeckill.getStartStatus());
                 auctionGoodsVO.setStartTime(goodsSeckill.getStartTime());
                 auctionGoodsVO.setEndTime(goodsSeckill.getEndTime());
-                auctionGoodsVO.setXiaosPrice(goodsSeckill.getSeckillPrice());
+                auctionGoodsVO.setXiaosPrice(goodsSku.getPrice());
+                auctionGoodsVO.setType(auctionCollection.getType());
                 auctionGoodsVOS.add(auctionGoodsVO);
-            }   if(auctionCollection.getType()==1){
+            }   if(auctionCollection.getType()==2){
                 GoodsGroupPurchase goodsGroupPurchase = goodsGroupPurchaseMapper.selectById(auctionCollection.getTargetId());
                 HomeGoodsSkuListVO auctionGoodsVO=new HomeGoodsSkuListVO();
                 GoodsSku goodsSku = goodsSkuMapper.selectById(goodsGroupPurchase.getGoodsSkuId());
                 auctionGoodsVO.setId(auctionCollection.getTargetId());
-                auctionGoodsVO.setPrice(goodsSku.getPrice());
+                auctionGoodsVO.setPrice(goodsGroupPurchase.getGroupPurchasePrice());
                 auctionGoodsVO.setCoverPic(goodsSku.getCoverPic());
                 auctionGoodsVO.setSkuName(goodsSku.getSkuName());
                 auctionGoodsVO.setSoldQuantity(goodsSku.getSoldQuantity());
                 auctionGoodsVO.setIsCollection(2);
-                auctionGoodsVO.setXiaosPrice(goodsGroupPurchase.getGroupPurchasePrice());
+                auctionGoodsVO.setXiaosPrice(goodsSku.getPrice());
                 auctionGoodsVO.setStartTime(goodsGroupPurchase.getStartTime());
                 auctionGoodsVO.setEndTime(goodsGroupPurchase.getEndTime());
                 auctionGoodsVO.setXiaosPrice(goodsGroupPurchase.getGroupPurchasePrice());
+                auctionGoodsVO.setType(auctionCollection.getType());
                 auctionGoodsVOS.add(auctionGoodsVO);
             }
 

--
Gitblit v1.7.1