guozhaoshun vor 6 Jahren
Ursprung
Commit
9ea777c9ad

+ 1 - 0
rankin-product-service/src/main/java/cn/rankin/productservice/repository/CourseSubRelationRepository.java

@@ -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);
 
     @Query(value = "select r from CourseSubRelation r where r.courseId = :courseId and r.status = :status order by r.sort")