File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.takensoft.ai_lms.lms.student.dao.StudentInfoDAO">
<!--
작 성 자 : 권민수
작 성 일 : 2024.07.25
내 용 : 학생 정보 관련 sql 매핑 xml 문서
-->
<resultMap id="StudentInfoResultMap" type="com.takensoft.ai_lms.lms.student.vo.StudentInfoVO">
<result property="studentName" column="studentName"/>
<result property="institutionName" column="institutionName"/>
<result property="grade" column="grade"/>
<result property="className" column="className"/>
<result property="studentQuestion" column="studentQuestion"/>
</resultMap>
<select id="getStudentInfo" resultType="com.takensoft.ai_lms.lms.student.vo.StudentInfoVO">
SELECT
u.user_nm AS studentName,
i.ednst_nm AS institutionName,
g.grd_no AS grade,
c.scls_nm AS className,
uc.stn_qna AS studentQuestion
FROM users u
JOIN institution i ON u.ednst_id = i.ednst_id
JOIN user_class uc ON u.user_id = uc.user_id
JOIN class c ON uc.scls_id = c.scls_id
JOIN grade g ON c.sgrd_id = g.sgrd_id
WHERE u.user_id = #{userId}
</select>
<update id="updateStudentQuestion">
UPDATE user_class
SET stn_qna = #{studentQuestion}
WHERE user_id = #{userId}
</update>
</mapper>