【修改】 选择题未选也继续记录归档

This commit is contained in:
DESKTOP-932OMT8\REN
2025-06-04 11:48:35 +08:00
parent 0eabe9fc42
commit 0ab28b6d88
5 changed files with 12 additions and 1 deletions

View File

@@ -22,4 +22,6 @@ public interface StuPaperScoreMapper extends BaseMapperX<StuPaperScoreDO> {
// 通过学生ID试卷ID 试题ID查询数据
StuPaperScoreDO findByStuIdAndPaperIdAndQuestionId(@Param("stuId") Long stuId, @Param("paperId") String paperId, @Param("quId") String questionId);
void deleteByStuIdAndPaperId(@Param("stuId") Long stuId, @Param("paperId") String paperId);
}

View File

@@ -22,4 +22,6 @@ public interface StuPaperScoreService {
StuScoreVo getStuScore(Long stuId, String paperId);
StuPaperScoreDO getStuScoreByPaperIdAndQuid(Long stuId, String paperId, String quId);
void deleteStuPaperScore(Long stuId, String paperId);
}

View File

@@ -76,4 +76,9 @@ public class StuPaperScoreServiceImpl implements StuPaperScoreService {
public StuPaperScoreDO getStuScoreByPaperIdAndQuid(Long stuId, String paperId, String quId) {
return stuPaperScoreMapper.findByStuIdAndPaperIdAndQuestionId(stuId, paperId, quId);
}
@Override
public void deleteStuPaperScore(Long stuId, String paperId) {
stuPaperScoreMapper.deleteByStuIdAndPaperId(stuId, paperId);
}
}

View File

@@ -30,6 +30,9 @@
<select id="findByStuIdAndPaperIdAndQuestionId" resultType="pc.exam.pp.module.exam.dal.dataobject.student.StuPaperScoreDO">
SELECT * FROM exam_stu_paper_score WHERE stu_id = #{stuId} AND paper_id = #{paperId} AND qu_id = #{quId}
</select>
<delete id="deleteByStuIdAndPaperId">
DELETE FROM exam_stu_paper_score WHERE stu_id = #{stuId} AND paper_id = #{paperId}
</delete>
</mapper>

View File

@@ -93,5 +93,4 @@ public class AutoToolsController {
stuPaperScoreInfoVos.setExamQuestionList(examQuestionList);
return CommonResult.success(stuPaperScoreInfoVos);
}
}