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.word_book.dao.WordBookDAO">
<!--
작 성 자 : 권민수
작 성 일 : 2024.07.29
내 용 : 단어장 정보 관련 sql 매핑 xml 문서
-->
<resultMap id="WordBookResultMap" type="WordBookVO">
<id property="wdBookId" column="wd_book_id"/>
<result property="wdBookTypeId" column="wd_book_type_id"/>
<result property="textId" column="text_id"/>
<result property="userId" column="user_id"/>
</resultMap>
<select id="getAllWordBooks" resultMap="WordBookResultMap">
SELECT
wd_book_id,
wd_book_type_id,
text_id,
user_id
FROM ai_lms.wordbook
</select>
<select id="getWordBookById" parameterType="string" resultMap="WordBookResultMap">
SELECT
wd_book_id,
wd_book_type_id,
text_id,
user_id
FROM ai_lms.wordbook
WHERE wd_book_id = #{wdBookId}
</select>
<insert id="insertWordBook" parameterType="WordBookVO">
INSERT INTO
ai_lms.wordbook (wd_book_id,
wd_book_type_id,
text_id,
user_id)
VALUES (#{wdBookId},
#{wdBookTypeId},
#{textId},
#{userId})
</insert>
<update id="updateWordBook" parameterType="WordBookVO">
UPDATE ai_lms.wordbook
SET wd_book_type_id = #{wdBookTypeId},
text_id = #{textId},
user_id = #{userId}
WHERE wd_book_id = #{wdBookId}
</update>
<delete id="deleteWordBook" parameterType="string">
DELETE FROM ai_lms.wordbook
WHERE wd_book_id = #{wdBookId}
</delete>
<select id="getWordBooksByTextTitle" resultType="WordBookVO">
SELECT wb.*
FROM wordbook wb
JOIN text t ON wb.text_id = t.text_id
WHERE t.text_ttl LIKE #{textTitle}
</select>
</mapper>