104 lines
3.7 KiB
XML
104 lines
3.7 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.ToolEmailConfigMapper">
|
|
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
|
|
<id column="config_id" jdbcType="BIGINT" property="configId" />
|
|
<result column="from_user" jdbcType="VARCHAR" property="fromUser" />
|
|
<result column="host" jdbcType="VARCHAR" property="host" />
|
|
<result column="pass" jdbcType="VARCHAR" property="pass" />
|
|
<result column="port" jdbcType="VARCHAR" property="port" />
|
|
<result column="user" jdbcType="VARCHAR" property="user" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
config_id, from_user, host, pass, port, user
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from tool_email_config
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from tool_email_config
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
|
|
insert into tool_email_config (config_id, from_user, host,
|
|
pass, port, user)
|
|
values (#{configId,jdbcType=BIGINT}, #{fromUser,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR},
|
|
#{pass,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, #{user,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
|
|
insert into tool_email_config
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="configId != null">
|
|
config_id,
|
|
</if>
|
|
<if test="fromUser != null">
|
|
from_user,
|
|
</if>
|
|
<if test="host != null">
|
|
host,
|
|
</if>
|
|
<if test="pass != null">
|
|
pass,
|
|
</if>
|
|
<if test="port != null">
|
|
port,
|
|
</if>
|
|
<if test="user != null">
|
|
user,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="configId != null">
|
|
#{configId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="fromUser != null">
|
|
#{fromUser,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="host != null">
|
|
#{host,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="pass != null">
|
|
#{pass,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="port != null">
|
|
#{port,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="user != null">
|
|
#{user,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
|
|
update tool_email_config
|
|
<set>
|
|
<if test="fromUser != null">
|
|
from_user = #{fromUser,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="host != null">
|
|
host = #{host,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="pass != null">
|
|
pass = #{pass,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="port != null">
|
|
port = #{port,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="user != null">
|
|
user = #{user,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.ToolEmailConfig">
|
|
update tool_email_config
|
|
set from_user = #{fromUser,jdbcType=VARCHAR},
|
|
host = #{host,jdbcType=VARCHAR},
|
|
pass = #{pass,jdbcType=VARCHAR},
|
|
port = #{port,jdbcType=VARCHAR},
|
|
user = #{user,jdbcType=VARCHAR}
|
|
where config_id = #{configId,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper> |