<?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.TbPlussSxfMccInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo">
    <id column="F_ID" jdbcType="INTEGER" property="fId" />
    <result column="F_mcc_code" jdbcType="VARCHAR" property="fMccCode" />
    <result column="F_grandpa_txt" jdbcType="VARCHAR" property="fGrandpaTxt" />
    <result column="F_father_txt" jdbcType="VARCHAR" property="fFatherTxt" />
    <result column="F_mcc_txt" jdbcType="VARCHAR" property="fMccTxt" />
    <result column="F_mcc_type" jdbcType="VARCHAR" property="fMccType" />
  </resultMap>
  <sql id="Base_Column_List">
    F_ID, F_mcc_code, F_grandpa_txt, F_father_txt, F_mcc_txt, F_mcc_type
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_sxf_mcc_info
    where F_ID = #{fId,jdbcType=INTEGER}
  </select>
  <select id="selectList" resultType="com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo">
    select
    <include refid="Base_Column_List" />
    from tb_pluss_sxf_mcc_info
    WHERE F_mcc_code = #{mccCode}
  </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_sxf_mcc_info
    where F_ID = #{fId,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo">
    insert into tb_pluss_sxf_mcc_info (F_ID, F_mcc_code, F_grandpa_txt, 
      F_father_txt, F_mcc_txt, F_mcc_type
      )
    values (#{fId,jdbcType=INTEGER}, #{fMccCode,jdbcType=VARCHAR}, #{fGrandpaTxt,jdbcType=VARCHAR}, 
      #{fFatherTxt,jdbcType=VARCHAR}, #{fMccTxt,jdbcType=VARCHAR}, #{fMccType,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo">
    insert into tb_pluss_sxf_mcc_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="fId != null">
        F_ID,
      </if>
      <if test="fMccCode != null">
        F_mcc_code,
      </if>
      <if test="fGrandpaTxt != null">
        F_grandpa_txt,
      </if>
      <if test="fFatherTxt != null">
        F_father_txt,
      </if>
      <if test="fMccTxt != null">
        F_mcc_txt,
      </if>
      <if test="fMccType != null">
        F_mcc_type,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="fId != null">
        #{fId,jdbcType=INTEGER},
      </if>
      <if test="fMccCode != null">
        #{fMccCode,jdbcType=VARCHAR},
      </if>
      <if test="fGrandpaTxt != null">
        #{fGrandpaTxt,jdbcType=VARCHAR},
      </if>
      <if test="fFatherTxt != null">
        #{fFatherTxt,jdbcType=VARCHAR},
      </if>
      <if test="fMccTxt != null">
        #{fMccTxt,jdbcType=VARCHAR},
      </if>
      <if test="fMccType != null">
        #{fMccType,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo">
    update tb_pluss_sxf_mcc_info
    <set>
      <if test="fMccCode != null">
        F_mcc_code = #{fMccCode,jdbcType=VARCHAR},
      </if>
      <if test="fGrandpaTxt != null">
        F_grandpa_txt = #{fGrandpaTxt,jdbcType=VARCHAR},
      </if>
      <if test="fFatherTxt != null">
        F_father_txt = #{fFatherTxt,jdbcType=VARCHAR},
      </if>
      <if test="fMccTxt != null">
        F_mcc_txt = #{fMccTxt,jdbcType=VARCHAR},
      </if>
      <if test="fMccType != null">
        F_mcc_type = #{fMccType,jdbcType=VARCHAR},
      </if>
    </set>
    where F_ID = #{fId,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo">
    update tb_pluss_sxf_mcc_info
    set F_mcc_code = #{fMccCode,jdbcType=VARCHAR},
      F_grandpa_txt = #{fGrandpaTxt,jdbcType=VARCHAR},
      F_father_txt = #{fFatherTxt,jdbcType=VARCHAR},
      F_mcc_txt = #{fMccTxt,jdbcType=VARCHAR},
      F_mcc_type = #{fMccType,jdbcType=VARCHAR}
    where F_ID = #{fId,jdbcType=INTEGER}
  </update>
</mapper>