|
|
@@ -88,6 +88,11 @@ public interface OrderRepo extends JpaRepository<Order, Long>, JpaSpecificationE
|
|
|
@Query(value = "select sum(price) from order_info where user_id = ?1 and status = 'FINISH'", nativeQuery = true)
|
|
|
BigDecimal sumUserPrice(Long userId);
|
|
|
|
|
|
- @Query("select o from Order o join Asset a on a.id = o.assetId join a.tags t on t.id = ?1 where o.userId not in ?2")
|
|
|
+ @Query("select o from Order o " +
|
|
|
+ " join Asset a on a.id = o.assetId " +
|
|
|
+ " join a.tags t on t.id = ?1 " +
|
|
|
+ "where o.userId not in ?2 " +
|
|
|
+ " and o.source = com.izouma.nineth.enums.CollectionSource.TRANSFER " +
|
|
|
+ " and o.status = com.izouma.nineth.enums.OrderStatus.FINISH")
|
|
|
Page<Order> byTag(Long tagId, List<Long> excludeUserId, Pageable pageable);
|
|
|
}
|