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