<?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.TbPlussMemberSettingMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMemberSetting">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="storeId" jdbcType="VARCHAR" property="storeid" />
    <result column="storeName" jdbcType="VARCHAR" property="storename" />
    <result column="servicePhone" jdbcType="VARCHAR" property="servicephone" />
    <result column="cardNum" jdbcType="VARCHAR" property="cardnum" />
    <result column="cardContent" jdbcType="VARCHAR" property="cardcontent" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="payDt" jdbcType="TIMESTAMP" property="paydt" />
    <result column="staffName" jdbcType="VARCHAR" property="staffname" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, merchantName, storeId, storeName, servicePhone, cardNum, cardContent, 
    createDt, payDt, staffName
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_member_setting
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_member_setting
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMemberSetting">
    insert into tb_pluss_member_setting (id, merchantCode, merchantName, 
      storeId, storeName, servicePhone, 
      cardNum, cardContent, createDt, 
      payDt, staffName)
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{storeid,jdbcType=VARCHAR}, #{storename,jdbcType=VARCHAR}, #{servicephone,jdbcType=VARCHAR}, 
      #{cardnum,jdbcType=VARCHAR}, #{cardcontent,jdbcType=VARCHAR}, #{createdt,jdbcType=TIMESTAMP}, 
      #{paydt,jdbcType=TIMESTAMP}, #{staffname,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMemberSetting">
    insert into tb_pluss_member_setting
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="storeid != null">
        storeId,
      </if>
      <if test="storename != null">
        storeName,
      </if>
      <if test="servicephone != null">
        servicePhone,
      </if>
      <if test="cardnum != null">
        cardNum,
      </if>
      <if test="cardcontent != null">
        cardContent,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="paydt != null">
        payDt,
      </if>
      <if test="staffname != null">
        staffName,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="merchantcode != null">
        #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="storeid != null">
        #{storeid,jdbcType=VARCHAR},
      </if>
      <if test="storename != null">
        #{storename,jdbcType=VARCHAR},
      </if>
      <if test="servicephone != null">
        #{servicephone,jdbcType=VARCHAR},
      </if>
      <if test="cardnum != null">
        #{cardnum,jdbcType=VARCHAR},
      </if>
      <if test="cardcontent != null">
        #{cardcontent,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="paydt != null">
        #{paydt,jdbcType=TIMESTAMP},
      </if>
      <if test="staffname != null">
        #{staffname,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMemberSetting">
    update tb_pluss_member_setting
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="storeid != null">
        storeId = #{storeid,jdbcType=VARCHAR},
      </if>
      <if test="storename != null">
        storeName = #{storename,jdbcType=VARCHAR},
      </if>
      <if test="servicephone != null">
        servicePhone = #{servicephone,jdbcType=VARCHAR},
      </if>
      <if test="cardnum != null">
        cardNum = #{cardnum,jdbcType=VARCHAR},
      </if>
      <if test="cardcontent != null">
        cardContent = #{cardcontent,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="paydt != null">
        payDt = #{paydt,jdbcType=TIMESTAMP},
      </if>
      <if test="staffname != null">
        staffName = #{staffname,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMemberSetting">
    update tb_pluss_member_setting
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      storeId = #{storeid,jdbcType=VARCHAR},
      storeName = #{storename,jdbcType=VARCHAR},
      servicePhone = #{servicephone,jdbcType=VARCHAR},
      cardNum = #{cardnum,jdbcType=VARCHAR},
      cardContent = #{cardcontent,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      payDt = #{paydt,jdbcType=TIMESTAMP},
      staffName = #{staffname,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>