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.class_book.dao.ClassBookDAO">
<!--
작성자 : 박세훈
작성일 : 2024.07.26
내 용 : 반에 교재 등록
-->
<insert id="registerBook" parameterType="String" >
INSERT INTO class_book( book_id,
scls_id
)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.bookId},
#{item.sclsId}
)
</foreach>
</insert>
<!--
작성자 : 박세훈
작성일 : 2024.07.26
내 용 : 반에 등록 된 교재 삭제
-->
<delete id="deleteClassBook" parameterType="String">
DELETE FROM class_book
WHERE
book_id = #{bookId} AND
scls_id = #{sclsId}
</delete>
<!--
작성자 : 박세훈
작성일 : 2024.07.29
내 용 : 반에 등록 된 교재 조회
-->
<select id="findByBookId" parameterType="String">
SELECT b.book_id, b.book_nm
FROM book b
JOIN class_book cb ON b.book_id = cb.book_id
JOIN class c ON cb.scls_id = c.scls_id
WHERE c.scls_id = #{sclsId};
</select>
</mapper>