|
|
@@ -58,6 +58,10 @@ public class AuctionServiceImpl extends ServiceImpl<AuctionMapper,Auction> imple
|
|
|
@Override
|
|
|
public List<Auction> selectAuctionList(Auction auction) {
|
|
|
IPage<Auction> page=new Page<>(auction.getPageNum(),auction.getPageSize());
|
|
|
+ List<Auction> auctions = getBaseMapper().selectAuctionList(page, auction);
|
|
|
+ // 过滤掉时间已结束的拍品
|
|
|
+ auctions.removeIf(po -> System.currentTimeMillis() > po.getEndTime().getTime());
|
|
|
+ // 返回
|
|
|
return getBaseMapper().selectAuctionList(page,auction);
|
|
|
}
|
|
|
|
|
|
@@ -148,6 +152,11 @@ public class AuctionServiceImpl extends ServiceImpl<AuctionMapper,Auction> imple
|
|
|
|
|
|
@Override
|
|
|
public List<Auction> selectBannerList() {
|
|
|
+ List<Auction> auctions = getBaseMapper().selectAucBannerList();
|
|
|
+ // 过滤掉时间已结束(如拍卖会id:5)时间未开始(如拍卖会id:4)
|
|
|
+ auctions.removeIf(auction -> System.currentTimeMillis() > auction.getEndTime().getTime()
|
|
|
+ || System.currentTimeMillis() < auction.getStartTime().getTime());
|
|
|
+ // 返回
|
|
|
return getBaseMapper().selectAucBannerList();
|
|
|
}
|
|
|
}
|