From 7323ba10a89e188a3df5f22d9d52d8f8b1d04f4b Mon Sep 17 00:00:00 2001 From: ilya Date: Tue, 12 Mar 2024 15:37:55 +0300 Subject: [PATCH] update apply tx logic and add logic for remove reserved domains when tx failed --- .../com/staketab/minanames/repository/DomainRepository.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/staketab/minanames/repository/DomainRepository.java b/src/main/java/com/staketab/minanames/repository/DomainRepository.java index 31aceaa..24a89f0 100644 --- a/src/main/java/com/staketab/minanames/repository/DomainRepository.java +++ b/src/main/java/com/staketab/minanames/repository/DomainRepository.java @@ -1,12 +1,15 @@ package com.staketab.minanames.repository; import com.staketab.minanames.entity.DomainEntity; +import com.staketab.minanames.entity.PayableTransactionEntity; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; +import java.util.Collection; import java.util.Optional; @@ -28,4 +31,6 @@ public interface DomainRepository extends JpaRepository { Page findAllDomainsByAccount(String searchStr, String accountAddress, Pageable buildPageable); Optional findDomainEntityByDomainName(String domainName); + + void deleteAllByTransactionIn(Collection transaction); }