mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-21 01:10:39 +08:00
225 lines
8.1 KiB
XML
225 lines
8.1 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.FileDOMapper">
|
|
<resultMap id="BaseResultMap" type="plus.bookshelf.Dao.DO.FileDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<result column="book_id" jdbcType="INTEGER" property="bookId" />
|
|
<result column="file_display_name" jdbcType="VARCHAR" property="fileDisplayName" />
|
|
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
|
|
<result column="file_format" jdbcType="VARCHAR" property="fileFormat" />
|
|
<result column="number_of_pages" jdbcType="INTEGER" property="numberOfPages" />
|
|
<result column="watermark" jdbcType="BIT" property="watermark" />
|
|
<result column="advertising" jdbcType="BIT" property="advertising" />
|
|
<result column="book_origin" jdbcType="VARCHAR" property="bookOrigin" />
|
|
<result column="file_create_at" jdbcType="TIMESTAMP" property="fileCreateAt" />
|
|
<result column="file_modified_at" jdbcType="TIMESTAMP" property="fileModifiedAt" />
|
|
<result column="file_size" jdbcType="BIGINT" property="fileSize" />
|
|
<result column="hash_sha1" jdbcType="VARCHAR" property="hashSha1" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
id, book_id, file_display_name, file_name, file_format, number_of_pages, watermark,
|
|
advertising, book_origin, file_create_at, file_modified_at, file_size, hash_sha1
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from file_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 file_info
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" parameterType="plus.bookshelf.Dao.DO.FileDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
insert into file_info (id, book_id, file_display_name,
|
|
file_name, file_format, number_of_pages,
|
|
watermark, advertising, book_origin,
|
|
file_create_at, file_modified_at, file_size,
|
|
hash_sha1)
|
|
values (#{id,jdbcType=INTEGER}, #{bookId,jdbcType=INTEGER}, #{fileDisplayName,jdbcType=VARCHAR},
|
|
#{fileName,jdbcType=VARCHAR}, #{fileFormat,jdbcType=VARCHAR}, #{numberOfPages,jdbcType=INTEGER},
|
|
#{watermark,jdbcType=BIT}, #{advertising,jdbcType=BIT}, #{bookOrigin,jdbcType=VARCHAR},
|
|
#{fileCreateAt,jdbcType=TIMESTAMP}, #{fileModifiedAt,jdbcType=TIMESTAMP}, #{fileSize,jdbcType=BIGINT},
|
|
#{hashSha1,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="plus.bookshelf.Dao.DO.FileDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
insert into file_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="bookId != null">
|
|
book_id,
|
|
</if>
|
|
<if test="fileDisplayName != null">
|
|
file_display_name,
|
|
</if>
|
|
<if test="fileName != null">
|
|
file_name,
|
|
</if>
|
|
<if test="fileFormat != null">
|
|
file_format,
|
|
</if>
|
|
<if test="numberOfPages != null">
|
|
number_of_pages,
|
|
</if>
|
|
<if test="watermark != null">
|
|
watermark,
|
|
</if>
|
|
<if test="advertising != null">
|
|
advertising,
|
|
</if>
|
|
<if test="bookOrigin != null">
|
|
book_origin,
|
|
</if>
|
|
<if test="fileCreateAt != null">
|
|
file_create_at,
|
|
</if>
|
|
<if test="fileModifiedAt != null">
|
|
file_modified_at,
|
|
</if>
|
|
<if test="fileSize != null">
|
|
file_size,
|
|
</if>
|
|
<if test="hashSha1 != null">
|
|
hash_sha1,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="bookId != null">
|
|
#{bookId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fileDisplayName != null">
|
|
#{fileDisplayName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileName != null">
|
|
#{fileName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileFormat != null">
|
|
#{fileFormat,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="numberOfPages != null">
|
|
#{numberOfPages,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="watermark != null">
|
|
#{watermark,jdbcType=BIT},
|
|
</if>
|
|
<if test="advertising != null">
|
|
#{advertising,jdbcType=BIT},
|
|
</if>
|
|
<if test="bookOrigin != null">
|
|
#{bookOrigin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileCreateAt != null">
|
|
#{fileCreateAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="fileModifiedAt != null">
|
|
#{fileModifiedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="fileSize != null">
|
|
#{fileSize,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="hashSha1 != null">
|
|
#{hashSha1,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="plus.bookshelf.Dao.DO.FileDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update file_info
|
|
<set>
|
|
<if test="bookId != null">
|
|
book_id = #{bookId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fileDisplayName != null">
|
|
file_display_name = #{fileDisplayName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileName != null">
|
|
file_name = #{fileName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileFormat != null">
|
|
file_format = #{fileFormat,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="numberOfPages != null">
|
|
number_of_pages = #{numberOfPages,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="watermark != null">
|
|
watermark = #{watermark,jdbcType=BIT},
|
|
</if>
|
|
<if test="advertising != null">
|
|
advertising = #{advertising,jdbcType=BIT},
|
|
</if>
|
|
<if test="bookOrigin != null">
|
|
book_origin = #{bookOrigin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileCreateAt != null">
|
|
file_create_at = #{fileCreateAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="fileModifiedAt != null">
|
|
file_modified_at = #{fileModifiedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="fileSize != null">
|
|
file_size = #{fileSize,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="hashSha1 != null">
|
|
hash_sha1 = #{hashSha1,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.FileDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update file_info
|
|
set book_id = #{bookId,jdbcType=INTEGER},
|
|
file_display_name = #{fileDisplayName,jdbcType=VARCHAR},
|
|
file_name = #{fileName,jdbcType=VARCHAR},
|
|
file_format = #{fileFormat,jdbcType=VARCHAR},
|
|
number_of_pages = #{numberOfPages,jdbcType=INTEGER},
|
|
watermark = #{watermark,jdbcType=BIT},
|
|
advertising = #{advertising,jdbcType=BIT},
|
|
book_origin = #{bookOrigin,jdbcType=VARCHAR},
|
|
file_create_at = #{fileCreateAt,jdbcType=TIMESTAMP},
|
|
file_modified_at = #{fileModifiedAt,jdbcType=TIMESTAMP},
|
|
file_size = #{fileSize,jdbcType=BIGINT},
|
|
hash_sha1 = #{hashSha1,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<select id="selectAll" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from file_info
|
|
</select>
|
|
</mapper> |