Преглед на файлове

新增按代码或名称查询课程接口

宋悦 преди 7 години
родител
ревизия
bd51b18ceb
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/CourseRepo.java

+ 1 - 1
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/CourseRepo.java

@@ -17,7 +17,7 @@ public interface CourseRepo extends JpaRepository<Course, Long>,QueryByExampleEx
 	
 	List<Course> findByIdNotIn(List<Long> ids);
 
-	@Query("select t from Course t where t.orgId = ?1 and (t.code like ?2 or t.name like ?2) and t.enable = true")
+	@Query("select t from Course t where t.orgId = ?1 and (t.code like %?2% or t.name like %?2%) and t.enable = true")
 	List<Course> findByCodeName(Long orgId,String codeName);
 
 }