| | |
| | | import com.ruoyi.system.api.domain.Member; |
| | | import com.ruoyi.system.api.domain.dto.AuctionGoodsListPageDTO; |
| | | import com.ruoyi.system.api.feignClient.MemberClient; |
| | | |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Override |
| | | public PageDTO<MemberArticleCollectionVO> getMemberArticleCollection(ArticleDTO articleDTO) { |
| | | Set<Long> goodsSkuIdList = null; |
| | | if (StringUtils.isNotEmpty(articleDTO.getTitle())) { |
| | | if (StringUtils.isNotEmpty(articleDTO.getGoodsSkuName())) { |
| | | LambdaQueryWrapper<Article> wrapper= Wrappers.lambdaQuery(); |
| | | wrapper.like(Article::getTitle,articleDTO.getTitle()); |
| | | wrapper.like(Article::getTitle,articleDTO.getGoodsSkuName()); |
| | | wrapper.eq(Article::getDelFlag,0); |
| | | List<Article> page1 = articleMapper.selectList(wrapper); |
| | | goodsSkuIdList = page1.stream().map(Article::getId) |
| | |
| | | if (StringUtils.isNotEmpty(articleDTO.getTitle())){ |
| | | if (goodsSkuIdList.size()>0){ |
| | | wrapper.in(MemberArticleCollection::getTargetId,goodsSkuIdList); |
| | | }else{ |
| | | Set<Long> goodsSkuIdList1 = new HashSet<>(); |
| | | goodsSkuIdList1.add(0L); |
| | | wrapper.in(MemberArticleCollection::getTargetId,goodsSkuIdList1); |
| | | } |
| | | } |
| | | wrapper.eq(MemberArticleCollection::getDelFlag,0); |
| | |
| | | memberArticleCollectionVO.setContent(byId.getContent()); |
| | | memberArticleCollectionVO.setImages(byId.getImages()); |
| | | memberArticleCollectionVO.setTitle(byId.getTitle()); |
| | | |
| | | memberArticleCollectionVO.setId(byId.getId()); |
| | | R<Member> membeOne = memberClient.getMembeOne(memberArticleCollectionVO.getMemberId(), |
| | | SecurityConstants.INNER); |
| | | Member data = membeOne.getData(); |