15 lines
566 B
XML

<?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.grtsinry43.bookmanagement.mapper.BookAuthorMapper">
<insert id="insertBookAuthor" parameterType="com.grtsinry43.bookmanagement.entity.BookAuthor">
INSERT INTO book_author (book_id, author_id)
VALUES (#{bookId}, #{authorId})
</insert>
<delete id="deleteByBookId" parameterType="int">
DELETE FROM book_author WHERE book_id = #{bookId}
</delete>
</mapper>