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.unit_learning.dao.UnitLearningDAO">
<resultMap id="unitLearningMap" type="UnitLearningVO">
<result property="unit_id" column="unit_id"/>
<result property="prblm_id" column="prblm_id"/>
<result property="wd_book_id" column="wd_book_id"/>
<result property="text_id" column="text_id"/>
<result property="eval_id" column="eval_id"/>
<result property="seq" column="seq"/>
</resultMap>
<!--
작 성 자 : 구자현
작 성 일 : 2024.07.26
내 용 : 로드맵의 상세 정보
-->
<select id="getUnitLearning" parameterType="String" resultMap="unitLearningMap">
SELECT
ul.unit_id,
ul.prblm_id,
ul.wd_book_id,
ul.text_id,
ul.eval_id,
ul.seq
FROM unit_learning ul
JOIN unit u
ON ul.unit_id = u.unit_id
WHERE ul.unit_id = #{unit_id} AND u.book_id = #{book_id}
ORDER BY seq
</select>
<!--
작 성 자 : 구자현
작 성 일 : 2024.07.26
내 용 : 로드맵 등록
-->
<insert id="insertUnitLearning" parameterType="list">
INSERT
INTO
unit_learning
(unit_id, prblm_id, wd_book_id, text_id, eval_id, seq)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.unit_id}, #{item.prblm_id}, #{item.wd_book_id}, #{item.text_id}, #{item.eval_id}, #{item.seq})
</foreach>
</insert>
<!--
작 성 자 : 구자현
작 성 일 : 2024.07.26
내 용 : 로드맵 수정
-->
<update id="updateUnitLearning" parameterType="unitLearningVO">
UPDATE unit_learning
SET seq = #{seq}
WHERE unit_id = #{unit_id}
<if test="prblm_id != null">
AND prblm_id = #{prblm_id}
</if>
<if test="wd_book_id != null">
AND wd_book_id = #{wd_book_id}
</if>
<if test="text_id != null">
AND text_id = #{text_id}
</if>
<if test="eval_id != null">
AND eval_id = #{eval_id}
</if>
</update>
<!--
작 성 자 : 구자현
작 성 일 : 2024.07.26
내 용 : 로드맵 삭제
-->
<delete id="deleteUnitLearning" parameterType="unitLearningVO">
DELETE
FROM unit_learning
WHERE unit_id = #{unit_id}
</delete>
</mapper>