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

216 lines
7.6 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.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="book_name" jdbcType="VARCHAR" property="bookName" />
<result column="category_id" jdbcType="INTEGER" property="categoryId" />
<result column="publishing_house" jdbcType="VARCHAR" property="publishingHouse" />
<result column="language" jdbcType="VARCHAR" property="language" />
<result column="copyright" jdbcType="VARCHAR" property="copyright" />
<result column="is_delete" jdbcType="BIT" property="isDelete" />
<result column="thumbnail" jdbcType="VARCHAR" property="thumbnail" />
<result column="author" jdbcType="VARCHAR" property="author" />
</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.
-->
<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.
-->
id, book_name, category_id, publishing_house, `language`, copyright, is_delete, thumbnail,
author
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from book_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from book_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into book_info (id, book_name, category_id,
publishing_house, `language`, copyright,
is_delete, thumbnail, author,
description)
values (#{id,jdbcType=INTEGER}, #{bookName,jdbcType=VARCHAR}, #{categoryId,jdbcType=INTEGER},
#{publishingHouse,jdbcType=VARCHAR}, #{language,jdbcType=VARCHAR}, #{copyright,jdbcType=VARCHAR},
#{isDelete,jdbcType=BIT}, #{thumbnail,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
#{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.
-->
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="publishingHouse != null">
publishing_house,
</if>
<if test="language != null">
`language`,
</if>
<if test="copyright != null">
copyright,
</if>
<if test="isDelete != null">
is_delete,
</if>
<if test="thumbnail != null">
thumbnail,
</if>
<if test="author != null">
author,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="bookName != null">
#{bookName,jdbcType=VARCHAR},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=INTEGER},
</if>
<if test="publishingHouse != null">
#{publishingHouse,jdbcType=VARCHAR},
</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="thumbnail != null">
#{thumbnail,jdbcType=VARCHAR},
</if>
<if test="author != null">
#{author,jdbcType=VARCHAR},
</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.
-->
update book_info
<set>
<if test="bookName != null">
book_name = #{bookName,jdbcType=VARCHAR},
</if>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=INTEGER},
</if>
<if test="publishingHouse != null">
publishing_house = #{publishingHouse,jdbcType=VARCHAR},
</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="thumbnail != null">
thumbnail = #{thumbnail,jdbcType=VARCHAR},
</if>
<if test="author != null">
author = #{author,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update book_info
set book_name = #{bookName,jdbcType=VARCHAR},
category_id = #{categoryId,jdbcType=INTEGER},
publishing_house = #{publishingHouse,jdbcType=VARCHAR},
`language` = #{language,jdbcType=VARCHAR},
copyright = #{copyright,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=BIT},
thumbnail = #{thumbnail,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.BookDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update book_info
set book_name = #{bookName,jdbcType=VARCHAR},
category_id = #{categoryId,jdbcType=INTEGER},
publishing_house = #{publishingHouse,jdbcType=VARCHAR},
`language` = #{language,jdbcType=VARCHAR},
copyright = #{copyright,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=BIT},
thumbnail = #{thumbnail,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>