1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-19 00:10:39 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
bookshelfplus/bookshelfplus/src/main/resources/mapping/BookDOMapper.xml

200 lines
7.5 KiB
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="plus.bookshelf.Dao.Mapper.BookDOMapper">
<resultMap id="BaseResultMap" type="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
<id column="id" jdbcType="TINYINT" property="id" />
<id column="book_name" jdbcType="VARCHAR" property="bookName" />
<result column="category_id" jdbcType="INTEGER" property="categoryId" />
<result column="publishing_house_id" jdbcType="INTEGER" property="publishingHouseId" />
<result column="language" jdbcType="VARCHAR" property="language" />
<result column="copyright" jdbcType="VARCHAR" property="copyright" />
<result column="is_delete" jdbcType="BIT" property="isDelete" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
id, book_name, category_id, publishing_house_id, language, copyright, is_delete
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
description
</sql>
<select id="selectByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.BookDOKey" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from book_info
where id = #{id,jdbcType=TINYINT}
and book_name = #{bookName,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.BookDOKey">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
delete from book_info
where id = #{id,jdbcType=TINYINT}
and book_name = #{bookName,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
insert into book_info (id, book_name, category_id,
publishing_house_id, language, copyright,
is_delete, description)
values (#{id,jdbcType=TINYINT}, #{bookName,jdbcType=VARCHAR}, #{categoryId,jdbcType=INTEGER},
#{publishingHouseId,jdbcType=INTEGER}, #{language,jdbcType=VARCHAR}, #{copyright,jdbcType=VARCHAR},
#{isDelete,jdbcType=BIT}, #{description,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
insert into book_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="bookName != null">
book_name,
</if>
<if test="categoryId != null">
category_id,
</if>
<if test="publishingHouseId != null">
publishing_house_id,
</if>
<if test="language != null">
language,
</if>
<if test="copyright != null">
copyright,
</if>
<if test="isDelete != null">
is_delete,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=TINYINT},
</if>
<if test="bookName != null">
#{bookName,jdbcType=VARCHAR},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=INTEGER},
</if>
<if test="publishingHouseId != null">
#{publishingHouseId,jdbcType=INTEGER},
</if>
<if test="language != null">
#{language,jdbcType=VARCHAR},
</if>
<if test="copyright != null">
#{copyright,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
#{isDelete,jdbcType=BIT},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
update book_info
<set>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=INTEGER},
</if>
<if test="publishingHouseId != null">
publishing_house_id = #{publishingHouseId,jdbcType=INTEGER},
</if>
<if test="language != null">
language = #{language,jdbcType=VARCHAR},
</if>
<if test="copyright != null">
copyright = #{copyright,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
is_delete = #{isDelete,jdbcType=BIT},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=TINYINT}
and book_name = #{bookName,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
update book_info
set category_id = #{categoryId,jdbcType=INTEGER},
publishing_house_id = #{publishingHouseId,jdbcType=INTEGER},
language = #{language,jdbcType=VARCHAR},
copyright = #{copyright,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=BIT},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=TINYINT}
and book_name = #{bookName,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
-->
update book_info
set category_id = #{categoryId,jdbcType=INTEGER},
publishing_house_id = #{publishingHouseId,jdbcType=INTEGER},
language = #{language,jdbcType=VARCHAR},
copyright = #{copyright,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=BIT}
where id = #{id,jdbcType=TINYINT}
and book_name = #{bookName,jdbcType=VARCHAR}
</update>
</mapper>