feat(student): 新增学生详情接口及相关服务层支持
- 优化ClassDOMapper,重命名查询方法为selectClassDOById,并移除多余CRUD方法 - 新增ClassService接口及ClassServiceImpl实现,用于通过ID查询班级信息 - 新增GradeDO及GradeDOMapper,实现根据班级ID查询年级信息 - 新增GradeService接口及GradeServiceImpl实现根据班级ID查询年级数据 - StudentDO增加isDeleted和startTime字段,补充学生实体 - StudentDOMapper新增selectStudentById方法实现单个学生信息查询 - StudentService及其实现类新增getStudentById方法提供学生单条数据查询 - StudentController新增/detail接口,实现学生详情查询,返回学生姓名、班级、年级等信息 - 创建FindStudentDetailReqVO和FindStudentDetailRspVO用于请求和响应数据传输 - enlish-vue端新增getStudentDetail接口调用 后台学生详情接口 - 修改ExamWordsDetailCard组件,展示学生姓名及其班级、年级信息,新增fetchStudent异步方法拉取学生详情数据并显示
This commit is contained in:
@@ -8,12 +8,10 @@
|
||||
<result column="grade_id" jdbcType="INTEGER" property="gradeId" />
|
||||
<result column="initial_vocabulary_size" jdbcType="INTEGER" property="initialVocabularySize" />
|
||||
<result column="current_vocabulary_size" jdbcType="INTEGER" property="currentVocabularySize" />
|
||||
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/>
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, class_id, grade_id, initial_vocabulary_size, current_vocabulary_size
|
||||
</sql>
|
||||
|
||||
<select id="selectStudentDOListByClassIdAndGradeId" resultMap="BaseResultMap">
|
||||
select *
|
||||
from student
|
||||
@@ -31,4 +29,10 @@
|
||||
select count(1)
|
||||
from student
|
||||
</select>
|
||||
|
||||
<select id="selectStudentById" resultMap="BaseResultMap">
|
||||
select *
|
||||
from student
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user