【修改】 获取学生试卷分数,参数传递错误
This commit is contained in:
@@ -18,7 +18,7 @@ public interface StuPaperScoreMapper extends BaseMapperX<StuPaperScoreDO> {
|
||||
|
||||
List<StuPaperScoreDO> findByStuIdAndPaperId(@Param("stuId") Long stuId, @Param("paperId") String paperId, @Param("temporaryId") String temporaryId);
|
||||
|
||||
List<StuScoreVo> getStuScore(@Param("stuId") Long stuId, @Param("paperId") String paperId);
|
||||
List<StuScoreVo> getStuScore(@Param("stuId") Long stuId, @Param("paperId") String paperId, @Param("temporaryId") String temporaryId);
|
||||
|
||||
// 通过学生ID,试卷ID ,试题ID,查询数据
|
||||
StuPaperScoreDO findByStuIdAndPaperIdAndQuestionId(@Param("stuId") Long stuId, @Param("paperId") String paperId, @Param("quId") String questionId);
|
||||
|
@@ -19,7 +19,7 @@ public interface StuPaperScoreService {
|
||||
|
||||
void updateStuPaperScore(StuPaperScoreDO stuPaperScoreDO);
|
||||
|
||||
StuScoreVo getStuScore(Long stuId, String paperId);
|
||||
StuScoreVo getStuScore(Long stuId, String paperId, String temporaryId);
|
||||
|
||||
StuPaperScoreDO getStuScoreByPaperIdAndQuid(Long stuId, String paperId, String quId);
|
||||
|
||||
|
@@ -42,7 +42,7 @@ public class StuPaperScoreServiceImpl implements StuPaperScoreService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public StuScoreVo getStuScore(Long stuId, String paperId) {
|
||||
public StuScoreVo getStuScore(Long stuId, String paperId, String temporaryId) {
|
||||
// 1、创建对象
|
||||
StuScoreVo stuScoreVo = new StuScoreVo();
|
||||
// 2、查询学生得分
|
||||
@@ -52,7 +52,7 @@ public class StuPaperScoreServiceImpl implements StuPaperScoreService {
|
||||
String nickName = "";
|
||||
String taskId = "";
|
||||
String picUrl = "";
|
||||
List<StuScoreVo> stuScoreVos = stuPaperScoreMapper.getStuScore(stuId, paperId);
|
||||
List<StuScoreVo> stuScoreVos = stuPaperScoreMapper.getStuScore(stuId, paperId, temporaryId);
|
||||
for (StuScoreVo scoreVo : stuScoreVos) {
|
||||
stuNumber = scoreVo.getStuNumber();
|
||||
nickName = scoreVo.getNickName();
|
||||
|
@@ -9,23 +9,23 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
<select id="findByStuIdAndPaperId" 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 paper_id = #{temporaryId} order by sort ASC
|
||||
SELECT * FROM exam_stu_paper_score WHERE stu_id = #{stuId} AND paper_id = #{paperId} AND temporary_id = #{temporaryId} order by sort ASC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getStuScore" resultType="pc.exam.pp.module.exam.dal.mysql.student.StuScoreVo">
|
||||
SELECT
|
||||
esps.stu_id AS stuId,
|
||||
esps.paper_id AS paperId,
|
||||
esps.score AS score,
|
||||
esps.true_score AS trueScore,
|
||||
su.username AS stuNumber,
|
||||
su.nickname AS nickName,
|
||||
su.avatar AS picUrl
|
||||
FROM
|
||||
exam_stu_paper_score AS esps
|
||||
LEFT JOIN system_users AS su ON esps.stu_id = su.id
|
||||
WHERE esps.stu_id = #{stuId} AND esps.paper_id = #{paperId}
|
||||
SELECT esps.stu_id AS stuId,
|
||||
esps.paper_id AS paperId,
|
||||
esps.score AS score,
|
||||
esps.true_score AS trueScore,
|
||||
su.username AS stuNumber,
|
||||
su.nickname AS nickName,
|
||||
su.avatar AS picUrl
|
||||
FROM exam_stu_paper_score AS esps
|
||||
LEFT JOIN system_users AS su ON esps.stu_id = su.id
|
||||
WHERE esps.stu_id = #{stuId}
|
||||
AND esps.paper_id = #{paperId}
|
||||
AND esps.temporary_id = #{temporaryId}
|
||||
</select>
|
||||
<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}
|
||||
|
Reference in New Issue
Block a user