<?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.TbPlussMerchantChannelImgMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelImg">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merImgId" jdbcType="INTEGER" property="merimgid" />
    <result column="channelType" jdbcType="INTEGER" property="channeltype" />
    <result column="channelImgUrl" jdbcType="VARCHAR" property="channelimgurl" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="srcUrl" jdbcType="VARCHAR" property="srcurl" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merImgId, channelType, channelImgUrl, createTime, updateTime, srcUrl
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_channel_img
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_channel_img
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelImg">
    insert into tb_pluss_merchant_channel_img (id, merImgId, channelType, 
      channelImgUrl, createTime, updateTime, 
      srcUrl)
    values (#{id,jdbcType=INTEGER}, #{merimgid,jdbcType=INTEGER}, #{channeltype,jdbcType=INTEGER}, 
      #{channelimgurl,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, 
      #{srcurl,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelImg">
    insert into tb_pluss_merchant_channel_img
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merimgid != null">
        merImgId,
      </if>
      <if test="channeltype != null">
        channelType,
      </if>
      <if test="channelimgurl != null">
        channelImgUrl,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
      <if test="srcurl != null">
        srcUrl,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="merimgid != null">
        #{merimgid,jdbcType=INTEGER},
      </if>
      <if test="channeltype != null">
        #{channeltype,jdbcType=INTEGER},
      </if>
      <if test="channelimgurl != null">
        #{channelimgurl,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="srcurl != null">
        #{srcurl,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelImg">
    update tb_pluss_merchant_channel_img
    <set>
      <if test="merimgid != null">
        merImgId = #{merimgid,jdbcType=INTEGER},
      </if>
      <if test="channeltype != null">
        channelType = #{channeltype,jdbcType=INTEGER},
      </if>
      <if test="channelimgurl != null">
        channelImgUrl = #{channelimgurl,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="srcurl != null">
        srcUrl = #{srcurl,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelImg">
    update tb_pluss_merchant_channel_img
    set merImgId = #{merimgid,jdbcType=INTEGER},
      channelType = #{channeltype,jdbcType=INTEGER},
      channelImgUrl = #{channelimgurl,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      srcUrl = #{srcurl,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>