【新增】 1、交互接口,学生端定时与后台交互,获取交互时间存入缓存;2、更换PC答题,使用交互时间进行判断
This commit is contained in:
@@ -5,56 +5,69 @@
|
||||
<mapper namespace="pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperMapper">
|
||||
|
||||
<resultMap type="EducationPaper" id="EducationPaperResult">
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="num" column="num" />
|
||||
<result property="counts" column="counts" />
|
||||
<result property="paperScore" column="paper_score" />
|
||||
<result property="rollUp" column="roll_up" />
|
||||
<result property="isAb" column="is_ab" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="deleted" column="deleted" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="paperId" column="paper_id"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="num" column="num"/>
|
||||
<result property="counts" column="counts"/>
|
||||
<result property="paperScore" column="paper_score"/>
|
||||
<result property="rollUp" column="roll_up"/>
|
||||
<result property="isAb" column="is_ab"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="creator" column="creator"/>
|
||||
<result property="updater" column="updater"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="EducationPaper" id="PaperIdAndNumResult">
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="num" column="num" />
|
||||
<result property="paperId" column="paper_id"/>
|
||||
<result property="num" column="num"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ExamQuestion" id="ExamQuestionResult">
|
||||
<result property="quId" column="qu_id" />
|
||||
<result property="quBankId" column="qu_bank_id" />
|
||||
<result property="quBankName" column="qu_bank_name" />
|
||||
<result property="chapteridDictText" column="chapterId_dict_text" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="quLevel" column="qu_level" />
|
||||
<result property="content" column="content" />
|
||||
<result property="contentText" column="content_text" />
|
||||
<result property="analysis" column="analysis" />
|
||||
<result property="pointNames" column="point_names" />
|
||||
<result property="keywords" column="keywords" />
|
||||
<result property="manual" column="manual" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updater" column="updater" />
|
||||
<result property="deleted" column="deleted" />
|
||||
<result property="status" column="status" />
|
||||
<result property="audit" column="audit" />
|
||||
<result property="courseName" column="course_name" />
|
||||
<result property="specialtyName" column="specialty_name" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="quId" column="qu_id"/>
|
||||
<result property="quBankId" column="qu_bank_id"/>
|
||||
<result property="quBankName" column="qu_bank_name"/>
|
||||
<result property="chapteridDictText" column="chapterId_dict_text"/>
|
||||
<result property="subjectName" column="subject_name"/>
|
||||
<result property="quLevel" column="qu_level"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="contentText" column="content_text"/>
|
||||
<result property="analysis" column="analysis"/>
|
||||
<result property="pointNames" column="point_names"/>
|
||||
<result property="keywords" column="keywords"/>
|
||||
<result property="manual" column="manual"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="creator" column="creator"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updater" column="updater"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="audit" column="audit"/>
|
||||
<result property="courseName" column="course_name"/>
|
||||
<result property="specialtyName" column="specialty_name"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectEducationPaperVo">
|
||||
select paper_id, task_id, num,counts, paper_score,roll_up, is_ab, status ,create_time,update_time,creator,updater ,deleted from education_paper
|
||||
select paper_id,
|
||||
task_id,
|
||||
num,
|
||||
counts,
|
||||
paper_score,
|
||||
roll_up,
|
||||
is_ab,
|
||||
status,
|
||||
create_time,
|
||||
update_time,
|
||||
creator,
|
||||
updater,
|
||||
deleted
|
||||
from education_paper
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -62,59 +75,84 @@
|
||||
<include refid="selectEducationPaperVo"/>
|
||||
where paper_id = #{paperId}
|
||||
</select>
|
||||
|
||||
<select id="selectPaperByPaperNum" resultType="java.lang.String">
|
||||
SELECT paper_id
|
||||
FROM education_paper
|
||||
WHERE num = #{paperNum}
|
||||
</select>
|
||||
|
||||
<select id="selectQuByPaperScheme" resultType="java.lang.String">
|
||||
|
||||
SELECT qu_id
|
||||
FROM exam_question
|
||||
WHERE
|
||||
specialty_name = #{taskSpecialty}
|
||||
AND subject_name = #{educationPaperScheme.spName}
|
||||
AND tenant_id =#{tId}
|
||||
and audit = '0'
|
||||
and status = '0'
|
||||
and deleted ='0'
|
||||
SELECT qu_id
|
||||
FROM exam_question
|
||||
WHERE
|
||||
specialty_name = #{taskSpecialty}
|
||||
AND subject_name = #{educationPaperScheme.spName}
|
||||
AND tenant_id =#{tId}
|
||||
and audit = '0'
|
||||
and status = '0'
|
||||
and deleted ='0'
|
||||
<if test="educationPaperScheme.quLevel != null and educationPaperScheme.quLevel != ''">
|
||||
AND qu_level = #{educationPaperScheme.quLevel}
|
||||
AND qu_level = #{educationPaperScheme.quLevel}
|
||||
</if>
|
||||
<if test="keywordList != null and keywordList.size() > 0">
|
||||
AND (
|
||||
<foreach collection="keywordList" item="kw" separator=" OR ">
|
||||
keywords LIKE CONCAT('%', #{kw}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="keywordList != null and keywordList.size() > 0">
|
||||
AND (
|
||||
<foreach collection="keywordList" item="kw" separator=" OR ">
|
||||
keywords LIKE CONCAT('%', #{kw}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="pointName != null and pointName.size() > 0">
|
||||
AND (
|
||||
<foreach collection="pointName" item="pt" separator=" OR ">
|
||||
point_names LIKE CONCAT('%', #{pt}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
ORDER BY RAND()
|
||||
LIMIT #{educationPaperScheme.quNumbers}
|
||||
<if test="pointName != null and pointName.size() > 0">
|
||||
AND (
|
||||
<foreach collection="pointName" item="pt" separator=" OR ">
|
||||
point_names LIKE CONCAT('%', #{pt}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
ORDER BY RAND()
|
||||
LIMIT #{educationPaperScheme.quNumbers}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectTaskIdByPaperId" resultType="java.lang.String">
|
||||
select task_id from education_paper where paper_id=#{paperId}
|
||||
select task_id
|
||||
from education_paper
|
||||
where paper_id = #{paperId}
|
||||
</select>
|
||||
<select id="selectPaperByTaskId" resultType="java.lang.String">
|
||||
select paper_id from education_paper where task_id=#{taskId} and deleted ='0'
|
||||
select paper_id
|
||||
from education_paper
|
||||
where task_id = #{taskId}
|
||||
and deleted = '0'
|
||||
</select>
|
||||
<select id="selectPaperRandomByTaskId" resultType="java.lang.String">
|
||||
select paper_id from education_paper where task_id=#{taskId} and roll_up ='2'
|
||||
select paper_id
|
||||
from education_paper
|
||||
where task_id = #{taskId}
|
||||
and roll_up = '2'
|
||||
|
||||
</select>
|
||||
<select id="selectPaperByTaskIdAndRoll" resultType="java.lang.String">
|
||||
select paper_id from education_paper where task_id=#{taskId} and deleted ='0'
|
||||
select paper_id
|
||||
from education_paper
|
||||
where task_id = #{taskId}
|
||||
and deleted = '0'
|
||||
</select>
|
||||
<select id="getPaperByTaskIdByType" resultMap="EducationPaperResult">
|
||||
select * from education_paper where task_id=#{taskId} and status ='0' and deleted ='0' and roll_up IS NOT NULL
|
||||
select *
|
||||
from education_paper
|
||||
where task_id = #{taskId}
|
||||
and status = '0'
|
||||
and deleted = '0'
|
||||
and roll_up IS NOT NULL
|
||||
|
||||
</select>
|
||||
<select id="getSelectPaperIdBySchemeIds" resultType="java.lang.String">
|
||||
select paper_id from education_paper_session where session_id =#{row}
|
||||
select paper_id
|
||||
from education_paper_session
|
||||
where session_id = #{row}
|
||||
|
||||
</select>
|
||||
<select id="selectPaperListByTaskId" resultMap="EducationPaperResult">
|
||||
@@ -122,16 +160,23 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
where task_id =#{taskId} and deleted ='0' and status ='0'
|
||||
</select>
|
||||
<select id="selectCountPaperList" resultType="java.lang.Integer">
|
||||
select count(*) from education_paper
|
||||
</select>
|
||||
select count(*)
|
||||
from education_paper
|
||||
</select>
|
||||
<select id="selectPaperIdAndNumByTaskId" resultMap="PaperIdAndNumResult">
|
||||
select paper_id ,num from education_paper where task_id=#{taskId} and deleted ='0'
|
||||
select paper_id, num
|
||||
from education_paper
|
||||
where task_id = #{taskId}
|
||||
and deleted = '0'
|
||||
</select>
|
||||
<select id="countPapersByTaskId" resultType="java.lang.Integer">
|
||||
select count(*) from education_paper where task_id =#{taskId} and deleted ='0'
|
||||
select count(*)
|
||||
from education_paper
|
||||
where task_id = #{taskId}
|
||||
and deleted = '0'
|
||||
</select>
|
||||
<select id="selectTaskNumByids" resultType="java.lang.String">
|
||||
select task_num from education_paper_task
|
||||
select task_num from education_paper_task
|
||||
WHERE task_id IN
|
||||
<foreach collection="cannotDeleteTaskIds" item="taskId" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
@@ -148,7 +193,8 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
<select id="selctStuScoreByStuIdAndPaperId" resultType="java.lang.Double">
|
||||
SELECT COALESCE(SUM(score), 0.0)
|
||||
FROM exam_stu_paper_score
|
||||
WHERE stu_id = #{stuId} AND paper_id = #{paperId}
|
||||
WHERE stu_id = #{stuId}
|
||||
AND paper_id = #{paperId}
|
||||
</select>
|
||||
|
||||
|
||||
@@ -191,7 +237,8 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
INSERT INTO education_paper (paper_id, task_id,num ,counts,paper_score, roll_up, is_ab, status ) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.paperId}, #{item.taskId}, #{item.num},#{item.counts},#{item.paperScore}, #{item.rollUp}, #{item.isAb}, #{item.status}
|
||||
#{item.paperId}, #{item.taskId}, #{item.num},#{item.counts},#{item.paperScore}, #{item.rollUp},
|
||||
#{item.isAb}, #{item.status}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
@@ -216,12 +263,12 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
</update>
|
||||
<update id="updateEducationByids">
|
||||
|
||||
UPDATE education_paper
|
||||
SET roll_up = '2', is_ab = null
|
||||
WHERE paper_id IN
|
||||
<foreach collection="strings" item="paperId" open="(" separator="," close=")">
|
||||
#{paperId}
|
||||
</foreach>
|
||||
UPDATE education_paper
|
||||
SET roll_up = '2', is_ab = null
|
||||
WHERE paper_id IN
|
||||
<foreach collection="strings" item="paperId" open="(" separator="," close=")">
|
||||
#{paperId}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateRandomByids">
|
||||
UPDATE education_paper
|
||||
@@ -233,8 +280,10 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
</update>
|
||||
<update id="updatePaperGuByRollup">
|
||||
UPDATE education_paper
|
||||
SET roll_up = null, is_ab = null
|
||||
where task_id=#{taskId} and roll_up ='1'
|
||||
SET roll_up = null,
|
||||
is_ab = null
|
||||
where task_id = #{taskId}
|
||||
and roll_up = '1'
|
||||
</update>
|
||||
<update id="updateEducationByidsThree">
|
||||
UPDATE education_paper
|
||||
@@ -247,12 +296,14 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
<update id="changeStatus">
|
||||
UPDATE education_paper
|
||||
SET status = #{status}
|
||||
where paper_id =#{paperId}
|
||||
where paper_id = #{paperId}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteEducationPaperByPaperId" parameterType="String">
|
||||
delete from education_paper where paper_id = #{paperId}
|
||||
delete
|
||||
from education_paper
|
||||
where paper_id = #{paperId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEducationPaperByPaperIds" parameterType="String">
|
||||
@@ -265,7 +316,4 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user