wangqifan 3 жил өмнө
parent
commit
ed66624d5a

+ 3 - 1
src/main/java/com/izouma/nineth/repo/OrderRepo.java

@@ -104,8 +104,10 @@ public interface OrderRepo extends JpaRepository<Order, Long>, JpaSpecificationE
             "  and o.status = com.izouma.nineth.enums.OrderStatus.FINISH")
     Page<Order> byTag(Long tagId, Long userId, Pageable pageable);
 
-    @Query(value = "select user_id from asset where id = ?1",nativeQuery = true)
+    @Query(value = "select user_id from asset where id = ?1", nativeQuery = true)
     Long selectUserId(Long assetId);
 
     int countAllByUserIdAndCollectionIdAndStatusIn(Long userId, Long collectionId, Collection<OrderStatus> status);
+
+    Order findFirstByCollectionIdOrderByCreatedAtDesc(Long collectionId);
 }