update 调整SQL 查询内容

develop
hhb@hotmail.com 2 months ago
parent 6e938227cb
commit 68182c0c21

@ -16,6 +16,6 @@ public interface ExamRepository extends CosmosRepository<Exam, String> {
List<Exam> findExamByClassId(@Param("code")String code, @Param("classId")String classId, @Param("periodId")String periodId); List<Exam> findExamByClassId(@Param("code")String code, @Param("classId")String classId, @Param("periodId")String periodId);
@Query("select * from Exam as s where s.code = @code and s.id = @id") @Query("select * from Exam as s where s.code = @code and s.id = @id")
List<Exam> findExamById(@Param("code")String code, @Param("id")String id); List<Exam> findExamById(@Param("code")String code, @Param("id")String id);
@Query("select s.id,s.papers from Exam as s where s.code = @code and s.lessonRecordId in (@ids)") @Query("select s.id,s.name,s.average,s.stuCount,s.createTime,s.papers from Exam as s where s.code = @code and s.lessonRecordId in (@ids)")
List<Exam> findExamsByIds(String code, Collection<String> ids); List<Exam> findExamsByIds(String code, Collection<String> ids);
} }

Loading…
Cancel
Save