@@ -13,6 +13,7 @@ public interface CourseSubRelationRepository extends BasicJpaRepository<CourseSu
List<CourseSubRelation> findByCourseId(String courseId);
+
@Query(value = "select r from CourseSubRelation r where r.courseId = :courseId and r.status = 0 order by r.sort limit 1", nativeQuery = true)
CourseSubRelation findFirstByCourseIdOrderBySort(String courseId);