【新增】 学生分数试卷绑定新增临时ID,方式同一学生同一试卷数据冲突
This commit is contained in:
@@ -34,6 +34,10 @@ public class StuPaperScoreDO extends TenantBaseDO {
|
||||
* 试卷ID
|
||||
*/
|
||||
private String paperId;
|
||||
/**
|
||||
* 临时ID,每次做题都会变
|
||||
*/
|
||||
private String temporaryId;
|
||||
/**
|
||||
* 试题ID
|
||||
*/
|
||||
|
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface StuPaperScoreMapper extends BaseMapperX<StuPaperScoreDO> {
|
||||
|
||||
List<StuPaperScoreDO> findByStuIdAndPaperId(@Param("stuId") Long stuId, @Param("paperId") String paperId);
|
||||
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);
|
||||
|
||||
|
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface StuPaperScoreService {
|
||||
|
||||
List<StuPaperScoreDO> findByStuIDAndPaperId(Long stuId, String paperId);
|
||||
List<StuPaperScoreDO> findByStuIDAndPaperId(Long stuId, String paperId, String temporaryId);
|
||||
|
||||
void insertStuPaperScore(StuPaperScoreDO stuPaperScoreDO);
|
||||
|
||||
|
@@ -27,8 +27,8 @@ public class StuPaperScoreServiceImpl implements StuPaperScoreService {
|
||||
private EducationPaperMapper educationPaperMapper;
|
||||
|
||||
@Override
|
||||
public List<StuPaperScoreDO> findByStuIDAndPaperId(Long stuId, String paperId) {
|
||||
return stuPaperScoreMapper.findByStuIdAndPaperId(stuId, paperId);
|
||||
public List<StuPaperScoreDO> findByStuIDAndPaperId(Long stuId, String paperId, String temporaryId) {
|
||||
return stuPaperScoreMapper.findByStuIdAndPaperId(stuId, paperId, temporaryId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -9,7 +9,7 @@
|
||||
文档可见: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} order by sort ASC
|
||||
SELECT * FROM exam_stu_paper_score WHERE stu_id = #{stuId} AND paper_id = #{paperId} AND paper_id = #{temporaryId} order by sort ASC
|
||||
</select>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user