<?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="cn.roadm.mapper.SmsBlackDynamicParamTemplateMapper">
  <resultMap id="BaseResultMap" type="cn.roadm.bo.SmsBlackDynamicParamTemplate">
    <!--@mbg.generated-->
    <!--@Table sms_black_dynamic_param_template-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="handler_name" jdbcType="VARCHAR" property="handlerName" />
    <result column="template" jdbcType="VARCHAR" property="template" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `name`, handler_name, `template`
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from sms_black_dynamic_param_template
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--@mbg.generated-->
    delete from sms_black_dynamic_param_template
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" keyProperty="id" parameterType="cn.roadm.bo.SmsBlackDynamicParamTemplate" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into sms_black_dynamic_param_template (`name`, handler_name, `template`
      )
    values (#{name,jdbcType=VARCHAR}, #{handlerName,jdbcType=VARCHAR}, #{template,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" keyProperty="id" parameterType="cn.roadm.bo.SmsBlackDynamicParamTemplate" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into sms_black_dynamic_param_template
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="name != null">
        `name`,
      </if>
      <if test="handlerName != null">
        handler_name,
      </if>
      <if test="template != null">
        `template`,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="handlerName != null">
        #{handlerName,jdbcType=VARCHAR},
      </if>
      <if test="template != null">
        #{template,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="cn.roadm.bo.SmsBlackDynamicParamTemplate">
    <!--@mbg.generated-->
    update sms_black_dynamic_param_template
    <set>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="handlerName != null">
        handler_name = #{handlerName,jdbcType=VARCHAR},
      </if>
      <if test="template != null">
        `template` = #{template,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.roadm.bo.SmsBlackDynamicParamTemplate">
    <!--@mbg.generated-->
    update sms_black_dynamic_param_template
    set `name` = #{name,jdbcType=VARCHAR},
      handler_name = #{handlerName,jdbcType=VARCHAR},
      `template` = #{template,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>

  <select id="selectList" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from sms_black_dynamic_param_template
  </select>
</mapper>
