|
@@ -21,6 +21,18 @@ import java.util.List;
|
|
|
@Repository
|
|
|
public interface ExamCaptureQueueRepo extends JpaRepository<ExamCaptureQueueEntity, Long>, JpaSpecificationExecutor<ExamCaptureQueueEntity> {
|
|
|
|
|
|
+ /**
|
|
|
+ * 分片按考试记录ID取需要待处理的记录
|
|
|
+ *
|
|
|
+ * @param shardTotal 分片总数
|
|
|
+ * @param shardIndex 当前分片索引
|
|
|
+ * @param batchSize 批量条数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Query(value = "select exam_record_data_id from ec_oet_exam_capture_queue" +
|
|
|
+ " where mod(exam_record_data_id,?1)=?2 group by exam_record_data_id limit ?3", nativeQuery = true)
|
|
|
+ List<Long> findQueuesGroupByExamRecordDataId(Integer shardTotal, Integer shardIndex, Integer batchSize);
|
|
|
+
|
|
|
/**
|
|
|
* @param limit 一次取值数量
|
|
|
* @param processBatchNum 批次号
|
|
@@ -29,6 +41,7 @@ public interface ExamCaptureQueueRepo extends JpaRepository<ExamCaptureQueueEnti
|
|
|
* @author lideyin
|
|
|
* @date 2019/7/31 16:40
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
@Query(value = "select * from ec_oet_exam_capture_queue "
|
|
|
+ " where status IN ('PENDING','PROCESS_FACE_COMPARE_FAILED') " +
|
|
|
" and (process_batch_num is null or (process_batch_num is not null and process_batch_num!=?2))"
|
|
@@ -42,6 +55,7 @@ public interface ExamCaptureQueueRepo extends JpaRepository<ExamCaptureQueueEnti
|
|
|
* @param processBatchNum 批次号
|
|
|
* @return List<ExamCaptureQueueEntity>
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
@Query(value = "select * from ec_oet_exam_capture_queue "
|
|
|
+ " where status IN ('PROCESS_FACE_COMPARE_COMPLETE','PROCESS_FACELIVENESS_FAILED') and process_batch_num!=?2 "
|
|
|
+ " order by priority desc,id asc limit ?1", nativeQuery = true)
|