jintao.geng hace 1 mes
padre
commit
d4e3a59c15

+ 1 - 1
lot/src/main/java/cn/hobbystocks/auc/service/impl/AuctionServiceImpl.java

@@ -60,7 +60,7 @@ public class AuctionServiceImpl extends ServiceImpl<AuctionMapper,Auction> imple
         IPage<Auction> page=new Page<>(auction.getPageNum(),auction.getPageSize());
         List<Auction> auctions = getBaseMapper().selectAuctionList(page, auction);
         // 过滤掉时间已结束的拍品
-        auctions.removeIf(po -> System.currentTimeMillis() > po.getEndTime().getTime());
+//        auctions.removeIf(po -> System.currentTimeMillis() > po.getEndTime().getTime());
         // 返回
         return auctions;
     }

+ 1 - 0
lot/src/main/resources/mapper/AuctionMapper.xml

@@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="auction.name != null  and auction.name != ''"> and name like concat('%', #{auction.name}, '%')</if>
             <if test="auction.pubStatus != null "> and pub_status = #{auction.pubStatus}</if>
+            <if test="auction.endTime != null "> and end_time &lt;= #{auction.endTime}</if>
             and del_flag &lt;&gt; 1
         </where>
         order by sort desc,id desc