mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-10-08 00:45:14 +08:00
231 lines
8.4 KiB
XML
231 lines
8.4 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.FileObjectDOMapper">
|
|
<resultMap id="BaseResultMap" type="plus.bookshelf.Dao.DO.FileObjectDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<result column="file_id" jdbcType="INTEGER" property="fileId" />
|
|
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
|
|
<result column="file_size" jdbcType="BIGINT" property="fileSize" />
|
|
<result column="file_type" jdbcType="VARCHAR" property="fileType" />
|
|
<result column="storage_medium_type" jdbcType="VARCHAR" property="storageMediumType" />
|
|
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
|
|
<result column="file_pwd" jdbcType="VARCHAR" property="filePwd" />
|
|
<result column="file_share_code" jdbcType="VARCHAR" property="fileShareCode" />
|
|
<result column="upload_status" jdbcType="VARCHAR" property="uploadStatus" />
|
|
<result column="file_sha1" jdbcType="VARCHAR" property="fileSha1" />
|
|
<result column="last_modified" jdbcType="BIGINT" property="lastModified" />
|
|
<result column="additional_fields" jdbcType="VARCHAR" property="additionalFields" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
id, file_id, file_name, file_size, file_type, storage_medium_type, file_path, file_pwd,
|
|
file_share_code, upload_status, file_sha1, last_modified, additional_fields
|
|
</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_object_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_object_info
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" parameterType="plus.bookshelf.Dao.DO.FileObjectDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
insert into file_object_info (id, file_id, file_name,
|
|
file_size, file_type, storage_medium_type,
|
|
file_path, file_pwd, file_share_code,
|
|
upload_status, file_sha1, last_modified,
|
|
additional_fields)
|
|
values (#{id,jdbcType=INTEGER}, #{fileId,jdbcType=INTEGER}, #{fileName,jdbcType=VARCHAR},
|
|
#{fileSize,jdbcType=BIGINT}, #{fileType,jdbcType=VARCHAR}, #{storageMediumType,jdbcType=VARCHAR},
|
|
#{filePath,jdbcType=VARCHAR}, #{filePwd,jdbcType=VARCHAR}, #{fileShareCode,jdbcType=VARCHAR},
|
|
#{uploadStatus,jdbcType=VARCHAR}, #{fileSha1,jdbcType=VARCHAR}, #{lastModified,jdbcType=BIGINT},
|
|
#{additionalFields,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="plus.bookshelf.Dao.DO.FileObjectDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
insert into file_object_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="fileId != null">
|
|
file_id,
|
|
</if>
|
|
<if test="fileName != null">
|
|
file_name,
|
|
</if>
|
|
<if test="fileSize != null">
|
|
file_size,
|
|
</if>
|
|
<if test="fileType != null">
|
|
file_type,
|
|
</if>
|
|
<if test="storageMediumType != null">
|
|
storage_medium_type,
|
|
</if>
|
|
<if test="filePath != null">
|
|
file_path,
|
|
</if>
|
|
<if test="filePwd != null">
|
|
file_pwd,
|
|
</if>
|
|
<if test="fileShareCode != null">
|
|
file_share_code,
|
|
</if>
|
|
<if test="uploadStatus != null">
|
|
upload_status,
|
|
</if>
|
|
<if test="fileSha1 != null">
|
|
file_sha1,
|
|
</if>
|
|
<if test="lastModified != null">
|
|
last_modified,
|
|
</if>
|
|
<if test="additionalFields != null">
|
|
additional_fields,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fileId != null">
|
|
#{fileId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fileName != null">
|
|
#{fileName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileSize != null">
|
|
#{fileSize,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="fileType != null">
|
|
#{fileType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="storageMediumType != null">
|
|
#{storageMediumType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="filePath != null">
|
|
#{filePath,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="filePwd != null">
|
|
#{filePwd,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileShareCode != null">
|
|
#{fileShareCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="uploadStatus != null">
|
|
#{uploadStatus,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileSha1 != null">
|
|
#{fileSha1,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="lastModified != null">
|
|
#{lastModified,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="additionalFields != null">
|
|
#{additionalFields,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="plus.bookshelf.Dao.DO.FileObjectDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update file_object_info
|
|
<set>
|
|
<if test="fileId != null">
|
|
file_id = #{fileId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="fileName != null">
|
|
file_name = #{fileName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileSize != null">
|
|
file_size = #{fileSize,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="fileType != null">
|
|
file_type = #{fileType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="storageMediumType != null">
|
|
storage_medium_type = #{storageMediumType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="filePath != null">
|
|
file_path = #{filePath,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="filePwd != null">
|
|
file_pwd = #{filePwd,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileShareCode != null">
|
|
file_share_code = #{fileShareCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="uploadStatus != null">
|
|
upload_status = #{uploadStatus,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="fileSha1 != null">
|
|
file_sha1 = #{fileSha1,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="lastModified != null">
|
|
last_modified = #{lastModified,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="additionalFields != null">
|
|
additional_fields = #{additionalFields,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="plus.bookshelf.Dao.DO.FileObjectDO">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update file_object_info
|
|
set file_id = #{fileId,jdbcType=INTEGER},
|
|
file_name = #{fileName,jdbcType=VARCHAR},
|
|
file_size = #{fileSize,jdbcType=BIGINT},
|
|
file_type = #{fileType,jdbcType=VARCHAR},
|
|
storage_medium_type = #{storageMediumType,jdbcType=VARCHAR},
|
|
file_path = #{filePath,jdbcType=VARCHAR},
|
|
file_pwd = #{filePwd,jdbcType=VARCHAR},
|
|
file_share_code = #{fileShareCode,jdbcType=VARCHAR},
|
|
upload_status = #{uploadStatus,jdbcType=VARCHAR},
|
|
file_sha1 = #{fileSha1,jdbcType=VARCHAR},
|
|
last_modified = #{lastModified,jdbcType=BIGINT},
|
|
additional_fields = #{additionalFields,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<select id="selectAll" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from file_object_info
|
|
</select>
|
|
<select id="selectByFilePath" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from file_object_info
|
|
where file_path = #{filePath}
|
|
</select>
|
|
</mapper> |