【修改】试卷任务的使用次数学生和管理端分开

This commit is contained in:
huababa1
2025-09-18 12:08:28 +08:00
parent f287610f99
commit e716f414a8
7 changed files with 53 additions and 23 deletions

View File

@@ -28,28 +28,32 @@
select score
from exam_monitor
where stu_id = #{stuId}
and task_id = #{taskId}
and task_id = #{taskId}
and deleted = '0'
and exam_status = '0'
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}
and task_id = #{taskId}
and deleted = '0'
and exam_status = '0'
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'
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'
and deleted = '0'
and exam_status = '0'
</select>
<select id="selectTent" resultMap="TentSpecialyResult">
@@ -63,6 +67,14 @@
WHERE ets.tenant_id = #{loginTenantId}
</select>
<select id="selectCountByUserIdAndTaskId" resultType="java.lang.Integer">
select sum(counts)
from exam_monitor
where stu_id =#{stuId}
and task_id = #{taskId}
and deleted = '0'
and exam_status = '0'
</select>
</mapper>