mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-12 19:51:39 +08:00
自动生成数据库映射文件
This commit is contained in:
264
bookshelfplus/src/main/resources/mapping/FileDOMapper.xml
Normal file
264
bookshelfplus/src/main/resources/mapping/FileDOMapper.xml
Normal file
@@ -0,0 +1,264 @@
|
||||
<?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.
|
||||
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
|
||||
-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<id 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="TINYINT" property="bookOrigin" />
|
||||
<result column="thumbnail" jdbcType="VARCHAR" property="thumbnail" />
|
||||
<result column="file_create_at" jdbcType="TIMESTAMP" property="fileCreateAt" />
|
||||
<result column="file_modified_at" jdbcType="TIMESTAMP" property="fileModifiedAt" />
|
||||
<result column="file_size" jdbcType="INTEGER" property="fileSize" />
|
||||
<result column="hash_md5" jdbcType="VARCHAR" property="hashMd5" />
|
||||
<result column="hash_sha1" jdbcType="VARCHAR" property="hashSha1" />
|
||||
<result column="hash_sha256" jdbcType="VARCHAR" property="hashSha256" />
|
||||
</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_id, file_display_name, file_name, file_format, number_of_pages, watermark,
|
||||
advertising, book_origin, thumbnail, file_create_at, file_modified_at, file_size,
|
||||
hash_md5, hash_sha1, hash_sha256
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.FileDOKey" resultMap="BaseResultMap">
|
||||
<!--
|
||||
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" />
|
||||
from file_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and book_id = #{bookId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.FileDOKey">
|
||||
<!--
|
||||
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 file_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and book_id = #{bookId,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.
|
||||
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
|
||||
-->
|
||||
insert into file_info (id, book_id, file_display_name,
|
||||
file_name, file_format, number_of_pages,
|
||||
watermark, advertising, book_origin,
|
||||
thumbnail, file_create_at, file_modified_at,
|
||||
file_size, hash_md5, hash_sha1,
|
||||
hash_sha256)
|
||||
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=TINYINT},
|
||||
#{thumbnail,jdbcType=VARCHAR}, #{fileCreateAt,jdbcType=TIMESTAMP}, #{fileModifiedAt,jdbcType=TIMESTAMP},
|
||||
#{fileSize,jdbcType=INTEGER}, #{hashMd5,jdbcType=VARCHAR}, #{hashSha1,jdbcType=VARCHAR},
|
||||
#{hashSha256,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.
|
||||
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
|
||||
-->
|
||||
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="thumbnail != null">
|
||||
thumbnail,
|
||||
</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="hashMd5 != null">
|
||||
hash_md5,
|
||||
</if>
|
||||
<if test="hashSha1 != null">
|
||||
hash_sha1,
|
||||
</if>
|
||||
<if test="hashSha256 != null">
|
||||
hash_sha256,
|
||||
</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=TINYINT},
|
||||
</if>
|
||||
<if test="thumbnail != null">
|
||||
#{thumbnail,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=INTEGER},
|
||||
</if>
|
||||
<if test="hashMd5 != null">
|
||||
#{hashMd5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="hashSha1 != null">
|
||||
#{hashSha1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="hashSha256 != null">
|
||||
#{hashSha256,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.
|
||||
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
|
||||
-->
|
||||
update file_info
|
||||
<set>
|
||||
<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=TINYINT},
|
||||
</if>
|
||||
<if test="thumbnail != null">
|
||||
thumbnail = #{thumbnail,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=INTEGER},
|
||||
</if>
|
||||
<if test="hashMd5 != null">
|
||||
hash_md5 = #{hashMd5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="hashSha1 != null">
|
||||
hash_sha1 = #{hashSha1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="hashSha256 != null">
|
||||
hash_sha256 = #{hashSha256,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and book_id = #{bookId,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.
|
||||
This element was generated on Sat Mar 12 18:53:08 SGT 2022.
|
||||
-->
|
||||
update file_info
|
||||
set 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=TINYINT},
|
||||
thumbnail = #{thumbnail,jdbcType=VARCHAR},
|
||||
file_create_at = #{fileCreateAt,jdbcType=TIMESTAMP},
|
||||
file_modified_at = #{fileModifiedAt,jdbcType=TIMESTAMP},
|
||||
file_size = #{fileSize,jdbcType=INTEGER},
|
||||
hash_md5 = #{hashMd5,jdbcType=VARCHAR},
|
||||
hash_sha1 = #{hashSha1,jdbcType=VARCHAR},
|
||||
hash_sha256 = #{hashSha256,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and book_id = #{bookId,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Reference in New Issue
Block a user