package common.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import common.model.RestTaskInfo; import java.util.List; public interface RestTaskInfoRepository extends JpaRepository<RestTaskInfo, Long> { @Query(value = "select * from rest_task_info where status = ?1", nativeQuery = true) List<RestTaskInfo> findByStatus(String init); @Query(value = "select status from rest_task_info where id = ?1", nativeQuery = true) String findStatus(Long id); }