xiatian 5 년 전
부모
커밋
3ea41078b1
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      examcloud-core-oe-student-dao/src/main/java/cn/com/qmth/examcloud/core/oe/student/dao/ExamRecordDataRepo.java

+ 1 - 2
examcloud-core-oe-student-dao/src/main/java/cn/com/qmth/examcloud/core/oe/student/dao/ExamRecordDataRepo.java

@@ -7,7 +7,6 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.stereotype.Repository;
-import org.springframework.transaction.annotation.Transactional;
 
 import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamRecordDataEntity;
 
@@ -19,7 +18,7 @@ import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamRecordDataEntity;
  */
 @Repository
 public interface ExamRecordDataRepo extends JpaRepository<ExamRecordDataEntity, Long>, JpaSpecificationExecutor<ExamRecordDataEntity> {
-    @Query(value = "select *  from ec_oes_exam_record_data where batch_num!=?1 and id>?2 order by id limit ?3",nativeQuery = true)
+    @Query(value = "select *  from ec_oes_exam_record_data where (batch_num is null or batch_num!=?1) and id>?2 order by id limit ?3",nativeQuery = true)
     List<ExamRecordDataEntity> getLimitExamRecordDataList(Long batchNum, Long startId, Integer size);
     
     @Modifying