Forráskód Böngészése

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

宋悦 7 éve
szülő
commit
7d1a2cf8e8

+ 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);
 
 }