|
@@ -1,13 +1,16 @@
|
|
package cn.com.qmth.examcloud.core.oe.admin.dao;
|
|
package cn.com.qmth.examcloud.core.oe.admin.dao;
|
|
|
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
import org.springframework.data.jpa.repository.Query;
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
|
+import org.springframework.data.repository.query.Param;
|
|
import org.springframework.stereotype.Repository;
|
|
import org.springframework.stereotype.Repository;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
+import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -104,7 +107,13 @@ public interface ExamRecordDataRepo extends JpaRepository<ExamRecordDataEntity,
|
|
"where record_data.exam_record_status in('EXAM_END','EXAM_OVERDUE') and record_data.exam_id=?1 " +
|
|
"where record_data.exam_record_status in('EXAM_END','EXAM_OVERDUE') and record_data.exam_id=?1 " +
|
|
"AND record_data.is_audit=0 ", nativeQuery = true)
|
|
"AND record_data.is_audit=0 ", nativeQuery = true)
|
|
List<ExamRecordDataEntity> findDataByExamId(Long examId);
|
|
List<ExamRecordDataEntity> findDataByExamId(Long examId);
|
|
-
|
|
|
|
|
|
+
|
|
@Query(value = "select t.id from ec_oe_exam_record_data t where t.base_paper_id=?1 limit 1", nativeQuery = true)
|
|
@Query(value = "select t.id from ec_oe_exam_record_data t where t.base_paper_id=?1 limit 1", nativeQuery = true)
|
|
Long getRecordIdByPaperId(String basePaperId);
|
|
Long getRecordIdByPaperId(String basePaperId);
|
|
|
|
+
|
|
|
|
+ @Transactional
|
|
|
|
+ @Modifying
|
|
|
|
+ @Query("update ExamRecordDataEntity set examRecordStatus = :examRecordStatus, endTime = :endTime where id = :id")
|
|
|
|
+ int updateExamRecordStatusById(@Param("id") long id, @Param("examRecordStatus") ExamRecordStatus examRecordStatus, @Param("endTime") Date endTime);
|
|
|
|
+
|
|
}
|
|
}
|