|
@@ -2,4 +2,80 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.qmth.themis.business.dao.TEExamActivityMapper">
|
|
|
|
|
|
+ <select id="existTable" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(*)
|
|
|
+ from
|
|
|
+ information_schema.TABLES
|
|
|
+ where
|
|
|
+ LCASE(TABLE_NAME)= #{tableName}
|
|
|
+ and TABLE_SCHEMA = #{schema};
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="dropTable">
|
|
|
+ DROP TABLE IF EXISTS ${tableName}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="createNewTable">
|
|
|
+ CREATE TABLE ${tableName} (
|
|
|
+ `id` bigint NOT NULL COMMENT '主键',
|
|
|
+ `exam_id` bigint NOT NULL COMMENT '批次id',
|
|
|
+ `code` varchar(50) NOT NULL COMMENT '场次代码',
|
|
|
+ `name` varchar(100) NOT NULL COMMENT '场次名称',
|
|
|
+ `prepare_seconds` int NOT NULL COMMENT '提前多长时间开始候考(秒)',
|
|
|
+ `min_start_time` datetime NOT NULL COMMENT '最早开考时间',
|
|
|
+ `max_start_time` datetime NOT NULL COMMENT '最晚开考时间,相当于迟到时间',
|
|
|
+ `max_duration_seconds` int DEFAULT NULL COMMENT '最大考试时长',
|
|
|
+ `min_duration_seconds` int DEFAULT NULL COMMENT '最短考试时间,相当于考试冻结时间(秒)',
|
|
|
+ `max_finish_time` datetime DEFAULT NULL COMMENT '集中收卷时间',
|
|
|
+ `exam_count` int DEFAULT NULL COMMENT '允许考试次数',
|
|
|
+ `break_expire_seconds` int DEFAULT NULL COMMENT '断点失效时间(秒)',
|
|
|
+ `break_resume_count` int DEFAULT NULL COMMENT '断点续考次数',
|
|
|
+ `entry_face_verify` tinyint DEFAULT NULL COMMENT '是否开启/强制开考人脸识别',
|
|
|
+ `entry_liveness_verify` tinyint DEFAULT NULL COMMENT '是否开启/强制开考活体检测',
|
|
|
+ `constant_face_verify` tinyint DEFAULT NULL COMMENT '考试过程中人脸检测是否开启',
|
|
|
+ `constant_liveness_verify_count` int DEFAULT NULL COMMENT '考试过程中随机活体验证次数',
|
|
|
+ `client_video_push` tinyint DEFAULT NULL COMMENT '是否开启/强制客户端视频监控',
|
|
|
+ `client_video_record` tinyint DEFAULT NULL COMMENT '是否开启客户端视频转录',
|
|
|
+ `wxapp_video_push` tinyint DEFAULT NULL COMMENT '是否开启/强制微信小程序监控',
|
|
|
+ `wxapp_video_record` tinyint DEFAULT NULL COMMENT '是否开启微信小程序视频转录',
|
|
|
+ `camera_photo_upload` tinyint DEFAULT NULL COMMENT '是否允许使用摄像头拍照答题',
|
|
|
+ `wxapp_photo_upload` tinyint DEFAULT NULL COMMENT '是否允许使用微信拍照答题',
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
+ UNIQUE KEY `${tableName}_code_Idx` (`code`)
|
|
|
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试场次'
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <insert id="insertInfo" parameterType="com.qmth.themis.business.entity.TEExamActivity">
|
|
|
+ INSERT INTO ${tableName}
|
|
|
+ (id, exam_id, code, name, prepare_seconds, min_start_time, max_start_time, max_duration_seconds, min_duration_seconds, max_finish_time, exam_count, break_expire_seconds, break_resume_count, entry_face_verify, entry_liveness_verify, constant_face_verify, constant_liveness_verify_count, client_video_push, client_video_record, wxapp_video_push, wxapp_video_record, camera_photo_upload, wxapp_photo_upload)
|
|
|
+ VALUES(
|
|
|
+ #{TEExamActivity.id},
|
|
|
+ #{TEExamActivity.examId},
|
|
|
+ #{TEExamActivity.code},
|
|
|
+ #{TEExamActivity.name},
|
|
|
+ #{TEExamActivity.prepareSeconds},
|
|
|
+ #{TEExamActivity.minStartTime},
|
|
|
+ #{TEExamActivity.maxStartTime},
|
|
|
+ #{TEExamActivity.maxDurationSeconds},
|
|
|
+ #{TEExamActivity.minDurationSeconds},
|
|
|
+ #{TEExamActivity.maxFinishTime},
|
|
|
+ #{TEExamActivity.examCount},
|
|
|
+ #{TEExamActivity.breakExpireSeconds},
|
|
|
+ #{TEExamActivity.breakResumeCount},
|
|
|
+ #{TEExamActivity.entryFaceVerify},
|
|
|
+ #{TEExamActivity.entryLivenessVerify},
|
|
|
+ #{TEExamActivity.constantFaceVerify},
|
|
|
+ #{TEExamActivity.constantLivenessVerifyCount},
|
|
|
+ #{TEExamActivity.clientVideoPush},
|
|
|
+ #{TEExamActivity.clientVideoRecord},
|
|
|
+ #{TEExamActivity.wxappVideoPush},
|
|
|
+ #{TEExamActivity.wxappVideoRecord},
|
|
|
+ #{TEExamActivity.cameraPhotoUpload},
|
|
|
+ #{TEExamActivity.wxappPhotoUpload});
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="selectListPage" resultType="java.util.Map">
|
|
|
+ select * from ${tableName}
|
|
|
+ </select>
|
|
|
</mapper>
|