|
|
@@ -44,7 +44,10 @@ public interface AssetRepo extends JpaRepository<Asset, Long>, JpaSpecificationE
|
|
|
|
|
|
Asset findFirstByTokenIdAndCreatedAtAfterOrderByCreatedAt(String tokenId, LocalDateTime time);
|
|
|
|
|
|
- List<Asset> findByTxHashIsNullAndTokenIdNotNullAndCreatedAtBeforeOrderByCreatedAtDesc(LocalDateTime time);
|
|
|
+ @Query("select a from Asset a where a.txHash is null and a.tokenId is not null " +
|
|
|
+ "and a.status = com.izouma.nineth.enums.AssetStatus.NORMAL and a.createdAt < ?1 " +
|
|
|
+ "order by a.createdAt desc")
|
|
|
+ List<Asset> toMint(LocalDateTime time);
|
|
|
|
|
|
@Query("select id from Asset where status = ?1")
|
|
|
List<Long> findAllByStatus(AssetStatus status);
|