132 lines
4.9 KiB
XML
132 lines
4.9 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.ToolQiniuConfigMapper">
|
|
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfig">
|
|
<id column="config_id" jdbcType="BIGINT" property="configId" />
|
|
<result column="bucket" jdbcType="VARCHAR" property="bucket" />
|
|
<result column="host" jdbcType="VARCHAR" property="host" />
|
|
<result column="type" jdbcType="VARCHAR" property="type" />
|
|
<result column="zone" jdbcType="VARCHAR" property="zone" />
|
|
</resultMap>
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
|
|
<result column="access_key" jdbcType="LONGVARCHAR" property="accessKey" />
|
|
<result column="secret_key" jdbcType="LONGVARCHAR" property="secretKey" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
config_id, bucket, host, type, zone
|
|
</sql>
|
|
<sql id="Blob_Column_List">
|
|
access_key, secret_key
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
,
|
|
<include refid="Blob_Column_List" />
|
|
from tool_qiniu_config
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from tool_qiniu_config
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
|
|
insert into tool_qiniu_config (config_id, bucket, host,
|
|
type, zone, access_key,
|
|
secret_key)
|
|
values (#{configId,jdbcType=BIGINT}, #{bucket,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR},
|
|
#{type,jdbcType=VARCHAR}, #{zone,jdbcType=VARCHAR}, #{accessKey,jdbcType=LONGVARCHAR},
|
|
#{secretKey,jdbcType=LONGVARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
|
|
insert into tool_qiniu_config
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="configId != null">
|
|
config_id,
|
|
</if>
|
|
<if test="bucket != null">
|
|
bucket,
|
|
</if>
|
|
<if test="host != null">
|
|
host,
|
|
</if>
|
|
<if test="type != null">
|
|
type,
|
|
</if>
|
|
<if test="zone != null">
|
|
zone,
|
|
</if>
|
|
<if test="accessKey != null">
|
|
access_key,
|
|
</if>
|
|
<if test="secretKey != null">
|
|
secret_key,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="configId != null">
|
|
#{configId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="bucket != null">
|
|
#{bucket,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="host != null">
|
|
#{host,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="type != null">
|
|
#{type,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="zone != null">
|
|
#{zone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="accessKey != null">
|
|
#{accessKey,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
<if test="secretKey != null">
|
|
#{secretKey,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
|
|
update tool_qiniu_config
|
|
<set>
|
|
<if test="bucket != null">
|
|
bucket = #{bucket,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="host != null">
|
|
host = #{host,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="type != null">
|
|
type = #{type,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="zone != null">
|
|
zone = #{zone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="accessKey != null">
|
|
access_key = #{accessKey,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
<if test="secretKey != null">
|
|
secret_key = #{secretKey,jdbcType=LONGVARCHAR},
|
|
</if>
|
|
</set>
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfigWithBLOBs">
|
|
update tool_qiniu_config
|
|
set bucket = #{bucket,jdbcType=VARCHAR},
|
|
host = #{host,jdbcType=VARCHAR},
|
|
type = #{type,jdbcType=VARCHAR},
|
|
zone = #{zone,jdbcType=VARCHAR},
|
|
access_key = #{accessKey,jdbcType=LONGVARCHAR},
|
|
secret_key = #{secretKey,jdbcType=LONGVARCHAR}
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolQiniuConfig">
|
|
update tool_qiniu_config
|
|
set bucket = #{bucket,jdbcType=VARCHAR},
|
|
host = #{host,jdbcType=VARCHAR},
|
|
type = #{type,jdbcType=VARCHAR},
|
|
zone = #{zone,jdbcType=VARCHAR}
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper> |