| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | |
| | | 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.getType()!=null){ |
| | | wrapper.eq(MemberGoodsCollection::getType,auctionCollectionDTO.getType()); |
| | | } |
| | | if (auctionCollectionDTO.getState()==1){ |
| | | List<MemberGoodsCollection> list = this.list(wrapper); |
| | | if (list.size()==0){ |
| | |
| | | if (StringUtils.isNotEmpty(auctionCollectionDTO.getGoodsSkuName())){ |
| | | if (goodsSkuIdList.size()>0){ |
| | | wrapper.in(MemberGoodsCollection::getTargetId,goodsSkuIdList); |
| | | }else{ |
| | | goodsSkuIdList=new HashSet<>(); |
| | | goodsSkuIdList.add(0L); |
| | | wrapper.in(MemberGoodsCollection::getTargetId,goodsSkuIdList); |
| | | } |
| | | } |
| | | List<MemberGoodsCollection> list = this.list(wrapper); |
| | |
| | | } 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(goodsGroupPurchase.getGroupPurchasePrice()); |
| | | auctionGoodsVO.setCoverPic(goodsSku.getCoverPic()); |
| | | auctionGoodsVO.setSkuName(goodsSku.getSkuName()); |
| | | auctionGoodsVO.setSoldQuantity(goodsSku.getSoldQuantity()); |
| | | auctionGoodsVO.setIsCollection(2); |
| | | auctionGoodsVO.setXiaosPrice(goodsSku.getPrice()); |
| | | auctionGoodsVO.setStartTime(goodsGroupPurchase.getStartTime()); |
| | | auctionGoodsVO.setEndTime(goodsGroupPurchase.getEndTime()); |
| | | auctionGoodsVO.setXiaosPrice(goodsGroupPurchase.getGroupPurchasePrice()); |
| | | auctionGoodsVO.setType(auctionCollection.getType()); |
| | | auctionGoodsVOS.add(auctionGoodsVO); |
| | | if(goodsGroupPurchase!=null){ |
| | | GoodsSku goodsSku = goodsSkuMapper.selectById(goodsGroupPurchase.getGoodsSkuId()); |
| | | auctionGoodsVO.setId(auctionCollection.getTargetId()); |
| | | auctionGoodsVO.setPrice(goodsGroupPurchase.getGroupPurchasePrice()); |
| | | auctionGoodsVO.setCoverPic(goodsSku.getCoverPic()); |
| | | auctionGoodsVO.setSkuName(goodsSku.getSkuName()); |
| | | auctionGoodsVO.setSoldQuantity(goodsSku.getSoldQuantity()); |
| | | auctionGoodsVO.setIsCollection(2); |
| | | auctionGoodsVO.setXiaosPrice(goodsSku.getPrice()); |
| | | auctionGoodsVO.setStartTime(goodsGroupPurchase.getStartTime()); |
| | | auctionGoodsVO.setEndTime(goodsGroupPurchase.getEndTime()); |
| | | auctionGoodsVO.setXiaosPrice(goodsGroupPurchase.getGroupPurchasePrice()); |
| | | auctionGoodsVO.setType(auctionCollection.getType()); |
| | | auctionGoodsVOS.add(auctionGoodsVO); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |