Files
cashier-client/src/main/resources/mapper/ToolQiniuContentMapper.xml
韩鹏辉 b96a251fd8 提交
2024-03-21 10:17:54 +08:00

128 lines
4.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="com.chaozhanggui.system.cashierservice.dao.ToolQiniuContentMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
<id column="content_id" jdbcType="BIGINT" property="contentId" />
<result column="bucket" jdbcType="VARCHAR" property="bucket" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="size" jdbcType="VARCHAR" property="size" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="suffix" jdbcType="VARCHAR" property="suffix" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
content_id, bucket, name, size, type, url, suffix, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tool_qiniu_content
where content_id = #{contentId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tool_qiniu_content
where content_id = #{contentId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
insert into tool_qiniu_content (content_id, bucket, name,
size, type, url, suffix,
update_time)
values (#{contentId,jdbcType=BIGINT}, #{bucket,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{size,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{suffix,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
insert into tool_qiniu_content
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="contentId != null">
content_id,
</if>
<if test="bucket != null">
bucket,
</if>
<if test="name != null">
name,
</if>
<if test="size != null">
size,
</if>
<if test="type != null">
type,
</if>
<if test="url != null">
url,
</if>
<if test="suffix != null">
suffix,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="contentId != null">
#{contentId,jdbcType=BIGINT},
</if>
<if test="bucket != null">
#{bucket,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="size != null">
#{size,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="suffix != null">
#{suffix,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
update tool_qiniu_content
<set>
<if test="bucket != null">
bucket = #{bucket,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="size != null">
size = #{size,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="suffix != null">
suffix = #{suffix,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where content_id = #{contentId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuContent">
update tool_qiniu_content
set bucket = #{bucket,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
size = #{size,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
suffix = #{suffix,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where content_id = #{contentId,jdbcType=BIGINT}
</update>
</mapper>