diff --git a/src/main/java/cn/van/business/repository/OrderRowRepository.java b/src/main/java/cn/van/business/repository/OrderRowRepository.java index 9ccddc0..535aae0 100644 --- a/src/main/java/cn/van/business/repository/OrderRowRepository.java +++ b/src/main/java/cn/van/business/repository/OrderRowRepository.java @@ -30,7 +30,7 @@ public interface OrderRowRepository extends JpaRepository { List findByValidCode(int validCode); // 查找 validCode != 15 或者 !=-1 的订单行 ,并且按orderTime 降序 - @Query("select o from OrderRow o where o.validCode not in ?1 order by o.orderTime DESC") + @Query("select o from OrderRow o where o.validCode not in ?1 and o.unionId =?2 order by o.orderTime DESC") List findByValidCodeNotInOrderByOrderTimeDescAndUnionId(int[] validCodes,Long unionId); @Query("select o from OrderRow o where o.validCode not in ?1 and o.orderTime >= ?2 order by o.orderTime DESC")