<?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.dao.system.dao.TbLklRegionBankInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbLklRegionBankInfo">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="s_code" jdbcType="VARCHAR" property="sCode" />
    <result column="s_name" jdbcType="VARCHAR" property="sName" />
    <result column="r_code" jdbcType="VARCHAR" property="rCode" />
    <result column="r_name" jdbcType="VARCHAR" property="rName" />
    <result column="clear_no" jdbcType="VARCHAR" property="clearNo" />
    <result column="area_code" jdbcType="VARCHAR" property="areaCode" />
    <result column="branch_bank_no" jdbcType="VARCHAR" property="branchBankNo" />
    <result column="branch_bank_name" jdbcType="VARCHAR" property="branchBankName" />
    <result column="bank_no" jdbcType="VARCHAR" property="bankNo" />
  </resultMap>
  <sql id="Base_Column_List">
    id, s_code, s_name, r_code, r_name, clear_no, area_code, branch_bank_no, branch_bank_name, 
    bank_no
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_lkl_region_bank_info
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_lkl_region_bank_info
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbLklRegionBankInfo">
    insert into tb_lkl_region_bank_info (id, s_code, s_name, 
      r_code, r_name, clear_no, 
      area_code, branch_bank_no, branch_bank_name, 
      bank_no)
    values (#{id,jdbcType=INTEGER}, #{sCode,jdbcType=VARCHAR}, #{sName,jdbcType=VARCHAR}, 
      #{rCode,jdbcType=VARCHAR}, #{rName,jdbcType=VARCHAR}, #{clearNo,jdbcType=VARCHAR}, 
      #{areaCode,jdbcType=VARCHAR}, #{branchBankNo,jdbcType=VARCHAR}, #{branchBankName,jdbcType=VARCHAR}, 
      #{bankNo,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbLklRegionBankInfo">
    insert into tb_lkl_region_bank_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="sCode != null">
        s_code,
      </if>
      <if test="sName != null">
        s_name,
      </if>
      <if test="rCode != null">
        r_code,
      </if>
      <if test="rName != null">
        r_name,
      </if>
      <if test="clearNo != null">
        clear_no,
      </if>
      <if test="areaCode != null">
        area_code,
      </if>
      <if test="branchBankNo != null">
        branch_bank_no,
      </if>
      <if test="branchBankName != null">
        branch_bank_name,
      </if>
      <if test="bankNo != null">
        bank_no,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="sCode != null">
        #{sCode,jdbcType=VARCHAR},
      </if>
      <if test="sName != null">
        #{sName,jdbcType=VARCHAR},
      </if>
      <if test="rCode != null">
        #{rCode,jdbcType=VARCHAR},
      </if>
      <if test="rName != null">
        #{rName,jdbcType=VARCHAR},
      </if>
      <if test="clearNo != null">
        #{clearNo,jdbcType=VARCHAR},
      </if>
      <if test="areaCode != null">
        #{areaCode,jdbcType=VARCHAR},
      </if>
      <if test="branchBankNo != null">
        #{branchBankNo,jdbcType=VARCHAR},
      </if>
      <if test="branchBankName != null">
        #{branchBankName,jdbcType=VARCHAR},
      </if>
      <if test="bankNo != null">
        #{bankNo,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbLklRegionBankInfo">
    update tb_lkl_region_bank_info
    <set>
      <if test="sCode != null">
        s_code = #{sCode,jdbcType=VARCHAR},
      </if>
      <if test="sName != null">
        s_name = #{sName,jdbcType=VARCHAR},
      </if>
      <if test="rCode != null">
        r_code = #{rCode,jdbcType=VARCHAR},
      </if>
      <if test="rName != null">
        r_name = #{rName,jdbcType=VARCHAR},
      </if>
      <if test="clearNo != null">
        clear_no = #{clearNo,jdbcType=VARCHAR},
      </if>
      <if test="areaCode != null">
        area_code = #{areaCode,jdbcType=VARCHAR},
      </if>
      <if test="branchBankNo != null">
        branch_bank_no = #{branchBankNo,jdbcType=VARCHAR},
      </if>
      <if test="branchBankName != null">
        branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
      </if>
      <if test="bankNo != null">
        bank_no = #{bankNo,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbLklRegionBankInfo">
    update tb_lkl_region_bank_info
    set s_code = #{sCode,jdbcType=VARCHAR},
      s_name = #{sName,jdbcType=VARCHAR},
      r_code = #{rCode,jdbcType=VARCHAR},
      r_name = #{rName,jdbcType=VARCHAR},
      clear_no = #{clearNo,jdbcType=VARCHAR},
      area_code = #{areaCode,jdbcType=VARCHAR},
      branch_bank_no = #{branchBankNo,jdbcType=VARCHAR},
      branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
      bank_no = #{bankNo,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>