<?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.TbPlussMercDeviceRefundImageMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMercDeviceRefundImage">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="picUrl" jdbcType="VARCHAR" property="picurl" />
    <result column="detailId" jdbcType="INTEGER" property="detailid" />
    <result column="orderNo" jdbcType="VARCHAR" property="orderno" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, userId, picUrl, detailId, orderNo, createTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merc_device_refund_image
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merc_device_refund_image
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMercDeviceRefundImage">
    insert into tb_pluss_merc_device_refund_image (id, userId, picUrl, 
      detailId, orderNo, createTime
      )
    values (#{id,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{picurl,jdbcType=VARCHAR}, 
      #{detailid,jdbcType=INTEGER}, #{orderno,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMercDeviceRefundImage">
    insert into tb_pluss_merc_device_refund_image
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="picurl != null">
        picUrl,
      </if>
      <if test="detailid != null">
        detailId,
      </if>
      <if test="orderno != null">
        orderNo,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="picurl != null">
        #{picurl,jdbcType=VARCHAR},
      </if>
      <if test="detailid != null">
        #{detailid,jdbcType=INTEGER},
      </if>
      <if test="orderno != null">
        #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMercDeviceRefundImage">
    update tb_pluss_merc_device_refund_image
    <set>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="picurl != null">
        picUrl = #{picurl,jdbcType=VARCHAR},
      </if>
      <if test="detailid != null">
        detailId = #{detailid,jdbcType=INTEGER},
      </if>
      <if test="orderno != null">
        orderNo = #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMercDeviceRefundImage">
    update tb_pluss_merc_device_refund_image
    set userId = #{userid,jdbcType=INTEGER},
      picUrl = #{picurl,jdbcType=VARCHAR},
      detailId = #{detailid,jdbcType=INTEGER},
      orderNo = #{orderno,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>