feat(student-plan): 添加完成学案功能

- 新增 FinishStudentPlanReqVO 类用于请求参数封装
- 学生端学习计划页面新增“完成”按钮及其交互状态
- 实现 finishLessonPlan API 调用,用于标记学案完成
- 后端新增 finishStudentPlan 接口,处理学案完成逻辑
- StudentLessonPlansDOMapper 增加 finfishStudentPlan 方法及对应 SQL 更新语句
- StudentLessonPlansService 添加 finishStudentLessonPlan 接口实现统计记忆单词数并更新学案状态
- VocabularyBankDOMapper 和 WordMasteryLogDOMapper 增加相关统计查询方法和 SQL
- 前端完善完成按钮状态和操作反馈,防止重复提交
This commit is contained in:
lbw
2025-12-17 17:17:49 +08:00
parent fd828442b1
commit 26674ab8a9
12 changed files with 114 additions and 2 deletions

View File

@@ -37,6 +37,7 @@
ORDER BY slp_in.student_id
LIMIT #{startIndex}, #{pageSize}
) AS temp ON slp.student_id = temp.student_id
where slp.is_finished = 0
ORDER BY slp.id
</select>
@@ -45,4 +46,12 @@
FROM student_lesson_plans;
</select>
<update id="finfishStudentPlan">
update student_lesson_plans
set is_finished = 1,
total_count = #{count},
mastery_rat = #{mastery}
where student_id = #{studentId}
and plan_id = #{planId}
</update>
</mapper>

View File

@@ -117,5 +117,9 @@
</if>
limit #{wordCount}
</select>
<select id="selectWordTotal" resultType="java.lang.Integer">
select count(*)
from vocabulary_bank
</select>
</mapper>

View File

@@ -22,6 +22,12 @@
order by memory_strength desc
limit #{limit}
</select>
<select id="selectStudentStrengthCount" resultType="java.lang.Integer">
select count(*)
from word_mastery_log
where student_id = #{studentId}
and memory_strength > 0
</select>
<insert id="batchInsertInitialization">
insert into word_mastery_log (student_id, word_id, update_time)