<?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.TbPlussWxBankCodeMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussWxBankCode">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="bankName" jdbcType="VARCHAR" property="bankname" />
    <result column="bankCode" jdbcType="VARCHAR" property="bankcode" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    id, bankName, bankCode, remark
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_wx_bank_code
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_wx_bank_code
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussWxBankCode">
    insert into tb_pluss_wx_bank_code (id, bankName, bankCode, 
      remark)
    values (#{id,jdbcType=INTEGER}, #{bankname,jdbcType=VARCHAR}, #{bankcode,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussWxBankCode">
    insert into tb_pluss_wx_bank_code
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="bankname != null">
        bankName,
      </if>
      <if test="bankcode != null">
        bankCode,
      </if>
      <if test="remark != null">
        remark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="bankname != null">
        #{bankname,jdbcType=VARCHAR},
      </if>
      <if test="bankcode != null">
        #{bankcode,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussWxBankCode">
    update tb_pluss_wx_bank_code
    <set>
      <if test="bankname != null">
        bankName = #{bankname,jdbcType=VARCHAR},
      </if>
      <if test="bankcode != null">
        bankCode = #{bankcode,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussWxBankCode">
    update tb_pluss_wx_bank_code
    set bankName = #{bankname,jdbcType=VARCHAR},
      bankCode = #{bankcode,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>