【修改】 监控管理中学生分数不一致的问题
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="pc.exam.pp.module.exam.dal.mysql.monitor.MonitorMapper">
|
||||
|
||||
<resultMap type="TentSpecialy" id="TentSpecialyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="specialtyId" column="specialty_id" />
|
||||
<result property="points" column="points" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="specialtyId" column="specialty_id"/>
|
||||
<result property="points" column="points"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
<update id="deleteByTaskIds">
|
||||
UPDATE exam_monitor
|
||||
@@ -21,36 +21,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<update id="deleteByTaskId">
|
||||
UPDATE exam_monitor
|
||||
SET deleted = '2'
|
||||
WHERE task_id =#{taskId}
|
||||
WHERE task_id = #{taskId}
|
||||
</update>
|
||||
|
||||
<select id="selectByStuIdAndTaskIdTop" resultType="java.lang.String">
|
||||
select score from exam_monitor where stu_id =#{stuId} and task_id=#{taskId} ORDER BY score DESC
|
||||
LIMIT 1
|
||||
select score
|
||||
from exam_monitor
|
||||
where stu_id = #{stuId}
|
||||
and task_id = #{taskId}
|
||||
ORDER BY score DESC LIMIT 1
|
||||
</select>
|
||||
<select id="selectByStuIdAndTaskIdNew" resultType="java.lang.String">
|
||||
select score from exam_monitor where stu_id =#{stuId} and task_id=#{taskId} ORDER BY create_time DESC
|
||||
LIMIT 1
|
||||
select score
|
||||
from exam_monitor
|
||||
where stu_id = #{stuId}
|
||||
and task_id = #{taskId}
|
||||
ORDER BY create_time DESC LIMIT 1
|
||||
</select>
|
||||
<select id="selectByStuIdAndTaskId" resultType="java.lang.String">
|
||||
select task_id from exam_monitor where stu_id = #{stuId} and exam_status !='2'
|
||||
select task_id
|
||||
from exam_monitor
|
||||
where stu_id = #{stuId}
|
||||
and exam_status !='2'
|
||||
</select>
|
||||
<select id="selectStuIdByTaskId" resultType="java.lang.String">
|
||||
select stu_id from exam_monitor where task_id =#{taskId} and deleted ='0' and exam_status ='0'
|
||||
select stu_id
|
||||
from exam_monitor
|
||||
where task_id = #{taskId}
|
||||
and deleted = '0'
|
||||
and exam_status = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectTent" resultMap="TentSpecialyResult">
|
||||
SELECT
|
||||
ets.*,
|
||||
es.sp_name AS name
|
||||
FROM
|
||||
exam_tenant_specialty ets
|
||||
LEFT JOIN
|
||||
exam_specialty es
|
||||
ON
|
||||
ets.specialty_id = es.sp_id
|
||||
WHERE
|
||||
ets.tenant_id = #{loginTenantId}
|
||||
SELECT ets.*,
|
||||
es.sp_name AS name
|
||||
FROM exam_tenant_specialty ets
|
||||
LEFT JOIN
|
||||
exam_specialty es
|
||||
ON
|
||||
ets.specialty_id = es.sp_id
|
||||
WHERE ets.tenant_id = #{loginTenantId}
|
||||
|
||||
</select>
|
||||
|
||||
|
@@ -9,11 +9,19 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
<select id="findByStuIdAndPaperId" resultType="pc.exam.pp.module.exam.dal.dataobject.student.StuPaperFileDO">
|
||||
SELECT * FROM exam_stu_paper_fileurl WHERE stu_id = #{stuId} AND paper_id = #{paperId}
|
||||
SELECT *
|
||||
FROM exam_stu_paper_fileurl
|
||||
WHERE stu_id = #{stuId}
|
||||
AND paper_id = #{paperId}
|
||||
AND temporary_id = #{temporaryId}
|
||||
</select>
|
||||
<select id="findOneByStuIdAndPaperId"
|
||||
resultType="pc.exam.pp.module.exam.dal.dataobject.student.StuPaperFileDO">
|
||||
SELECT * FROM exam_stu_paper_fileurl WHERE stu_id = #{stuId} AND paper_id = #{paperId} and type =#{type}
|
||||
SELECT *
|
||||
FROM exam_stu_paper_fileurl
|
||||
WHERE stu_id = #{stuId}
|
||||
AND paper_id = #{paperId}
|
||||
and type = #{type}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user