#21 .

Merged
sunkean merged 1 commits from sunkean/dev into sunkean/master 2 years ago
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/main/java/com/izouma/meta/repo/MetaScheduledFutureRepo.java

+ 2 - 0
src/main/java/com/izouma/meta/repo/MetaScheduledFutureRepo.java

@@ -4,6 +4,7 @@ import com.izouma.meta.domain.MetaScheduledFuture;
 import com.izouma.meta.enums.ScheduledFutureType;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
 
 import java.util.List;
 
@@ -11,6 +12,7 @@ public interface MetaScheduledFutureRepo extends JpaRepository<MetaScheduledFutu
 
     MetaScheduledFuture findByTypeAndTaskId(ScheduledFutureType type, String taskId);
 
+    @Query("delete from MetaScheduledFuture m where m.type = ?1 and m.taskId = ?2")
     void deleteByTypeAndTaskId(ScheduledFutureType type, String taskId);
 
     List<MetaScheduledFuture> findAllByType(ScheduledFutureType type);